Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: regex logical equivalence?

by Roger (Parson)
on Feb 04, 2004 at 10:38 UTC ( [id://326457] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    use strict;
    use warnings;
    [roger@www#] blah blah foo
    [] crap crap
    \[\e[0m\] [0m foo bar
  2. or download this
    regex: /(\[?[\w@\-\.]*[>$%@~# ]\]?|\\\[\\e\[0m\\\]\ \[0m)\s?/
    [roger@www#] blah blah foo    matched: [roger@www#]
    [] crap crap    matched: []
    \[\e[0m\] [0m foo bar         matched: \[\e[0m\] [0m