Wow, an impressive set of responses -- thanks Erez, Chas, Chris, C., Shawn,
and Jennifer.

I think most of the response pointed to "non-greedy" matches, is that right?
Are those deprecated or discouraged?

Thanks again.

- Bryan





> On Wed, Jul 14, 2010 at 00:50, C.DeRykus <dery...@gmail.com> wrote:
> snip
>>> s/(\w+)\s/$1&nbsp;/g;
> snip
>> Neat.  Using the \K construct available in 5.10, you can even
>> eliminate the need for the capture:
>> 
>>   s/  \w+  \K \s /&nbsp;/gx;
> snip
> 
> Yeah, but both of these are fragile, the following string won't work:
> 
> data: "this, is a string" more: "this is another"
> 



--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to