[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 308
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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