SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Oct 2008
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    annoying preg_match

    I have a problem with some preg_match

    I'm trying to match &mynumber=20

    The pattern i'm using is

    Code:
    /&mynumber=[\d]/i
    But this is only matching &mynumber=2, so only the first digit.

    I tried

    Code:
    /&mynumber=[\d+]/i
    and still taking only the first number after the =

  2. #2
    SitePoint Zealot
    Join Date
    Dec 2006
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    /&mynumber=\d+/i

  3. #3
    SitePoint Addict
    Join Date
    Oct 2008
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you..
    Regular expression can never but remain annoying anywya:P


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
  •