Skip to content

Commit

Permalink
allow brackets outside phone numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
kulikalov authored and xitanggg committed Jul 11, 2023
1 parent 8b5932e commit b959132
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const hasAt = (item: TextItem) => item.text.includes("@");
// Simple phone regex that matches (xxx)-xxx-xxxx where () and - are optional, - can also be space
export const matchPhone = (item: TextItem) =>
item.text.match(/\(?\d{3}\)?[\s-]?\d{3}[\s-]?\d{4}/);
const hasParenthesis = (item: TextItem) => /[()]/.test(item.text);
const hasParenthesis = (item: TextItem) => /\([0-9]+\)/.test(item.text);

// Location
// Simple location regex that matches "<City>, <ST>"
Expand Down

0 comments on commit b959132

Please sign in to comment.