[ale] Reg-exp question...

Fletch fletch at phydeaux.org
Tue Apr 22 10:39:56 EDT 2003


>>>>> "F" == F Grant Robertson <f.g.robertson at alexiongroup.com> writes:

    F> Ok, I've been working on modifying webmin to work right with
    F> the newer virtual delivery agent in postfix.  It's taken me all
    F> morning to figure out the right question to ask :) Can someone
    F> help explain this regexp to me?

    F>  /:\/[^,\s]*/


$ perl -MYAPE::Regex::Explain -le 'print YAPE::Regex::Explain->new(shift)->explain' ':\/[^,\s]*'


The regular expression:

(?-imsx::\/[^,\s]*)

matches as follows:

NODE                     EXPLANATION
----------------------------------------------------------------------
(?-imsx:                 group, but do not capture (case-sensitive)
                         (with ^ and $ matching normally) (with . not
                         matching \n) (matching whitespace and #
                         normally):
----------------------------------------------------------------------
  :                        ':'
----------------------------------------------------------------------
  \/                       '/'
----------------------------------------------------------------------
  [^,\s]*                  any character except: ',', whitespace (\n,
                           \r, \t, \f, and " ") (0 or more times
                           (matching the most amount possible))
----------------------------------------------------------------------
)                        end of grouping
----------------------------------------------------------------------



-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
770 294-0820 (m)      |  scary questions." -- Jules                =(___)=
                      |                                               U
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list