epanda schreef:

Don't top post. Don't quote signatures and other trailers.

> rvtol:
>> epanda:

>>> I want to replace my pattern by the corresponding value of the key
>>> in the hash table [...]
>>> with a single %s/pattern/hashpattern/g expression
>>
>> Why that last condition? Sounds like homework.
>> And is unsound: often you want to do the longest possible change
>> first.
>
> It is ok I have found the good one substitution for me but I am
> amazing that perl is not as clever as vimscript regex in limitation of
> assertions.

Define "clever". I think you just need to look much more into the
matter.


> ex : perl is lost when I want to say that a digit has to not be
> preceed by this sentence :
> <aWord><aCharacter><aComma><aNumberOfUndefinedSpaces>
> /(?<!FRUIT.;\s*)\b(\d+)
>                     |_______________________the pb is here

I don't see why you have a "\b" in there.

Should "FRUIT." match patterns like "FRUITS" and "FRUITY"?

First you say <aComma>, then you show a semicolon.

Now come up with actual example where you had a problem with.

-- 
Affijn, Ruud

"Gewoon is een tijger."


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to