in reply to Re: Regexp dashes at boundaries
in thread Regexp dashes at boundaries

Yes that does it. Now can I ask why you use the (?:...) extension? I tried it without and it works. I assume you have a good reason for putting it in there, but I looked up that regexp extension in the Camel book and the explanation is...um...sort of cryptic: "This is for clustering, not capturing; it groups subexpressions like ``()'', but doesn't make backreferences as ``()'' does." Thanks for the help... Steve

Replies are listed 'Best First'.
Re^3: Regexp dashes at boundaries
by brian_d_foy (Abbot) on Mar 24, 2005 at 18:43 UTC

    I used the non-capturing parentheses to create a group so I could apply a quantifier to it. I want the "U.S. " to be optional, so I want to apply a * to that whole group. I should probably have used a ? (zero or one) though.

    --
    brian d foy <bdfoy@cpan.org>