HI,
Is there a way to have a subexpression in a regexp that will be matched (if it exists) but will not be returned in the result string?
EXAMPLE:
input="FAX: 555.555.5555"
re=/(?:FAX.*)\d{3}.\d{3}.d{4}/
so the resulting string would not contain the "FAX: " part?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.