Re: Regular expression help



lochuanjiang@xxxxxxxxx wrote:
: Thanks for the advices..

: Relatively still new to perl and trying to read out the regular
: expression in english is a daunting task for me.

Redefine your approach to regular expressions. Carefully read the
Perl documentation (perlre), study the examples given (not only by
passively staring at them, but by actually trying to craft your
own sample data, things you want to find and matching REs) and go
from simple to complicated, rather than trying to understand this
aweful, cluttered and obfuscated regex code you presented here, and
thus going from complicated to simple (which will be unreachable).

Oliver.


--
Dr. Oliver Corff e-mail: corff@xxxxxxxxxxxxxxxxxx
.



Relevant Pages

  • Re: What do you need to have to be considered a Master at Perl?
    ... Someone who understands the Chomsky hierarchy, ... I don't think perl actually existed back then. ... "I've learnt how to match balanced parentheses with regular expressions." ... I don't care if perl regular expressions are or aren't kosher. ...
    (comp.lang.perl.misc)
  • Re: How to change the comparsion criteria of diff?
    ... I'm meeting the problem with diff methods in Perl. ... one containing regular-expression string ... normal regular expression does. ...
    (comp.lang.perl.misc)
  • Re: regular expression and not form
    ... How can I express "match any string except 'ABC'" in regular ... If you can use tools supporting Perl-compatible regex, like Perl, ...
    (comp.unix.shell)
  • Re: replace string with variable
    ... |> Hi, from Spain, I'm new user in perl, I have a problem with regular ... |> I dont know how I can replace the zeros on the right of the decimal ...
    (comp.lang.perl.misc)