The moose likes HTML, CSS and JavaScript and the fly likes reg exp to check number in a text Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "reg exp to check number in a text" Watch "reg exp to check number in a text" New topic
Author

reg exp to check number in a text

Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
Hi,

Could anyone help with regular expression to check if there are any numeric value in a text

eg : abc is valid, abc1 is not valid

I promise i will start studying regular expression , but right now i need some help

Thanks,
Rajeev
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
\d

Eric
Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
Thanks eric, One thing i noticed is that it works good on javascript but the same is not working from java application side.. does regular expression behaves different in java script and java ?

im using this reg exp tester for testing

Thanks for your reply

Rajeev
[ April 24, 2006: Message edited by: Rajeev Ravindran ]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: reg exp to check number in a text
 
Similar Threads
RegEx problem
Regular expression for allowing space, . , @ ,_ and , -
Regec Problem
Regular expression for valid xml
Regular Expression requred to get Java class names from text file