CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner: Re: [lovinPerl] A simple regex question: Edit Log


Jan 20, 2013, 12:38 PM

Views: 1635
Re: [lovinPerl] A simple regex question

One other thing...escaping things in regexes makes them very hard to read. One trick is to put the character inside a character class. Inside a character class, the special regex characters lose their special meaning. Also, using some whitespace to separate the parts of your regex (coupled with the x modifier) will make your regexes easier to read:

if ( /(\w) \1 [*] | (\w) [*] \1/x )

(This post was edited by 7stud on Jan 20, 2013, 12:39 PM)

Edit Log:
Post edited by 7stud (Enthusiast) on Jan 20, 2013, 12:39 PM

Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives