foobar44
Programmer
- Dec 15, 2007
- 1
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?
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?