[ale] Reg-exp question...

F. Grant Robertson f.g.robertson at alexiongroup.com
Tue Apr 22 10:59:41 EDT 2003


Wow, way to teach a man to fish..  I didn't know you could get perl to explain to for you..  Wow, that's gotta be the coolest thing I've learned in a long time.

Thanks as usual Fletch..  <bows to the list god of perl>

-G


-----Original Message-----
From: ale-admin at ale.org [mailto:ale-admin at ale.org]On Behalf Of Fletch
To: ale at ale.org
Sent: Tuesday, April 22, 2003 10:40 AM
To: ale at ale.org
Subject: Re: [ale] Reg-exp question...


>>>>> "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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.474 / Virus Database: 272 - Release Date: 4/18/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.474 / Virus Database: 272 - Release Date: 4/18/2003

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list