in reply to Re^2: Using Regex to extract variable-length substring
in thread Using Regex to extract variable-length substring

I REALLY need to learn regex

Just do it. ;-) I know that the task may look a bit daunting at first, and something like  /\[(.+?)]/ may look like cryptic noise for some one not knowing how to interpret those funny characters, but it is actually fairly easy to understand and learn the basics of regexes if given the proper explanations or the right tutorial. Granted, regexes can become fairly hairy, but for more common tasks, it is definitely worth the effort, especially when developing in Perl.

Replies are listed 'Best First'.
Re^4: Using Regex to extract variable-length substring
by StrangeDucks (Initiate) on Oct 30, 2013 at 15:22 UTC

    "... or the right tutorial"

    I shudder at the thought of trying to find one on the web... one that doesn't have errors or teach bad practice. Too many sites simply echo other sites, garbage and all and post as their own. I may just break down and buy a book on it - I was thinking of the O'Reilly one. I've had good success with their perl series. Any of other suggestions would be welcome.

      Jeffrey Friedl's Mastering Regular Expressions is really an authority on the subject. It is a O' Reilly book. Not entirely sure, though, that it is the best for a pure beginner. I *think* that it can be downloaded for free (in due respect of the law, that is), but am not entirely sure.

        Thanks for the suggestion. I'll check it out. I prefer dead-tree versions over electronic copies and will chuck up the bucks to buy it. Even it not the best for me, I can use it as a reference decoding expressions I find along my travels.

        I went kicking and screaming into object oriented programming - and still hate it - but, regex's will actually save me coding in the future. I just hate to learn new stuff :)