SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: RegEx Help

Threaded View

  1. #1
    SitePoint Addict inverse.chi's Avatar
    Join Date
    May 2006
    Location
    Oxford, UK | Durham, UK
    Posts
    243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    RegEx Help

    Hi,

    I am trying to make a regular expression that will match any whole integer or any decimal number for example

    182, 123.38378, 2.99

    i would have thought it was something like

    ^(\d+\.\d+)|\d+$

    but i dont think this will work.

    any help - links - guidance would be useful

    ---- i solves this because my backslash for the . was wrong

    ^(\d+/.\d+)|\d+$
    Last edited by inverse.chi; Aug 8, 2008 at 07:20. Reason: problem solved
    Malachi Soord
    Something will come here


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
  •