UNPKG
resume-parser-mcp
Version:
latest (1.0.4)
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
To install dependencies:
resume-parser-mcp
/
src
/
parser
/
extractResumeField
/
extractPhone.ts
6 lines
(5 loc)
•
213 B
text/typescript
View Raw
1
2
3
4
5
6
export
function
extractPhone
(
text: string
) {
const
phoneRegex =
/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/g
;
const
matches = text.
match
(phoneRegex);
return
matches ? matches[
0
] :
null
; }