SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: regex modifier

  1. #1
    SitePoint Addict
    Join Date
    Jul 2003
    Location
    NY
    Posts
    326
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    regex modifier

    what is the "si" at the end of this expression?

    $pattern = "@<\s*a\s+href\s*=\s*([\"\'])?(http://([^>\"\']+))\\1.*?>@si";

    does the i make it case insentive?

    I'm try to make so its not case senstive, which according the php.net it needs an "i" modifier. I guess after the expression

    I just not sure where to stick it, if it needs to get stuck

  2. #2
    SitePoint Wizard Sillysoft's Avatar
    Join Date
    May 2002
    Location
    United States :)
    Posts
    1,691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    SitePoint Addict
    Join Date
    Jul 2003
    Location
    NY
    Posts
    326
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so modifiers can just be consecutive there doesn't have to be some sort of dividing character between 2

  4. #4
    SitePoint Wizard Sillysoft's Avatar
    Join Date
    May 2002
    Location
    United States :)
    Posts
    1,691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Correct

  5. #5
    SitePoint Guru
    Join Date
    Jul 2004
    Location
    Raleigh, NC
    Posts
    783
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in regular expressions, most characters stand alone. grouping and the need for separation is the exception. it's counter-intuitive to most modern coders because most modern languages are the other way around


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
  •