Re: How to avoid this greedy match?
- From: Uri Guttman <uri@xxxxxxxxxxxxxxx>
- Date: Tue, 29 Jan 2008 18:03:25 GMT
"JWK" == John W Krahn <krahnj@xxxxxxxxx> writes:
JWK> I seem to remember that Jeffrey Friedl's[1] book describes a way to
JWK> emulate left and right word boundaries in Perl's regular expressions.
that shouldn't be too hard with lookbehind/lookahead. just look one way
for \w and the other way for \W. the ordering of the two will make it a
left or right word boundary. but i don't see the need for left/right. if
you use a word regex somewhere, the a \b before it is left and \b after
it is right. there really isn't a need for left vs right boundaries IMO
and no one has complained louldy that perl only has \b.
uri
--
Uri Guttman ------ uri@xxxxxxxxxxxxxxx -------- http://www.sysarch.com --
----- Perl Architecture, Development, Training, Support, Code Review ------
----------- Search or Offer Perl Jobs ----- http://jobs.perl.org ---------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
.
- References:
- Re: How to avoid this greedy match?
- From: News Howardz
- RE: How to avoid this greedy match?
- From: Ajay Nagrale
- Re: How to avoid this greedy match?
- From: Yitzle
- Re: How to avoid this greedy match?
- From: John W. Krahn
- Re: How to avoid this greedy match?
- Prev by Date: Re: Clear a hash
- Next by Date: Re: About File::Monitor
- Previous by thread: Re: How to avoid this greedy match?
- Next by thread: Re: How to avoid this greedy match?
- Index(es):