[Israel.pm] regex question
avishalom at gmail.com
Tue Jan 5 05:32:06 PST 2010
It looks like you were trying to attach this image to your penultimate paragraph
2010/1/5 Amir E. Aharoni <amir.aharoni at mail.huji.ac.il>:
> On Tue, Jan 5, 2010 at 14:39, Yossi Itzkovich
> <Yossi.Itzkovich at ecitele.com> wrote:
>> I need to catch a text between, for example, the word "myWord" and a word which is not "myWord".
>> I can do it like : m~\bmyWord\b(.+?)\b[^m][^y][^W][^o][^r][^d]\b~ but I guess there is a much better alternative.
>> Thanks in advance
> I am not sure that i completely understood what you want to
> accomplish. Can you send some examples of string that should and
> should not match?
> In any case, it sounds like you're searching for Look-Around
> Assertions, which i use very often. Take a look at:
> אָמִיר אֱלִישָׁע אַהֲרוֹנִי
> Amir Elisha Aharoni
> "We're living in pieces,
> I want to live in peace." - T. Moore
> Perl mailing list
> Perl at perl.org.il
More information about the Perl