Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 305
  • Last Modified:

Need regular Expression

Hi I need a regular expressions

1 number 0-9 and no spaces

thank you
chuck
0
Charles Baldo
Asked:
Charles Baldo
  • 2
2 Solutions
 
xRalfCommented:
^\d$
0
 
xRalfCommented:
no spaces : \W
0
 
khan_webguruCommented:
Hello Bro,

Here is regular expression for 0 to 9 positive number

 
@^(0|[1-9][0-9]*)$@

Open in new window


But if you want to use number and no spaces expression together then you should use the following.

\d+

Open in new window


Hope this will solve your problem.

Regards,

Asif Ahmed Khan
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now