SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist
    Join Date
    Dec 2005
    Posts
    527
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    regular expressen

    what is the meaning of this regular expression ? (each part)

    "/\<persion\>(.*?)\<\/persion/>/$"

    I need a quick refrense

  2. #2
    I ♥ PHP
    Join Date
    Jul 2003
    Location
    Melbourne, Australia
    Posts
    579
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is looking for a an XML(?) element named "persion".

    eg. <persion>foo</persion> will pass.

    Regards,
    Jordan

  3. #3
    Obey the Purebreed trib4lmaniac's Avatar
    Join Date
    Dec 2004
    Location
    Cornwall, UK
    Posts
    594
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's a very badly formed regular expression. Forward slashes all over the place and inconsistent escaping.

    Is this a PCRE? Or is it being used in in conjunction with ereg functions (or even something completely different)?

  4. #4
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    If you need a reference, then start here:

    http://regexlib.com

    Or look at:

    http://www.ilovejackdaniels.com/cheat-sheets/

  5. #5
    Obey the Purebreed trib4lmaniac's Avatar
    Join Date
    Dec 2004
    Location
    Cornwall, UK
    Posts
    594
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or even:

    Easily the best regex resource I've found to date.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •