SPUG: ifs and whiles and hashes...
Scott Blachowicz
Scott.Blachowicz at seaslug.org
Wed Aug 18 18:57:47 CDT 1999
On Wed, Aug 18, 1999 at 04:51:05PM -0700, Tim Maher/CONSULTIX wrote:
> - or ([^"]+), depending on the minimal acceptable match.
>
> Good idea Doug, but according to his code, he was trying to match up
> to the next \" sequence, not the next ". He may have mistakenly
> been trying to (unnecessarily) escape the " characters, in which
> case your approach above would be appropriate, but I recommended
> the .*? approach on the basis of his apparent need to match up to
> the next \" sequence.
I don't think so...the sequence \" in a regexp should match a single,
literal double-quote. I thought the general rule was that you could
back-whack any non-alphanumeric to get it treated as a literal
(regardless of whether it has a special interpretation without the
back-whack).
--
Scott.Blachowicz at seaslug.org
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
Email to majordomo at pm.org: ACTION spug-list your_address
More information about the spug-list
mailing list