web development helpdesk

objects quality – the visible difference

Categories

  • application server (14)
  • css (2)
  • gwt (5)
  • html (7)
  • iphone (5)
  • java (343)
    • jdbc (11)
    • swing (52)
  • javascript (4)
    • jquery (2)
  • jsp (9)
  • linux (7)
  • mac (3)
  • php (2)
  • spring (6)
  • tools (9)
  • wordpress (2)
  • xml (13)

Archives

  • February 2012
  • July 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • Home
How do I use regular expressions to decode text containing html escape code? How do I convert an ASCII value to a character?
Sep 05

How to check if a String is an integer using a regular expression?

java Add comments
String s = "321";
boolean isNumber = s.matches("-?\\d+");

written by objects \\ tags: int, regexp, string


Leave a Reply

You must be logged in to post a comment.

Thanks to N.Design Studio, MangoOrange™ and Web Hosting

Also see

  1. How to check if a Java String is an integer?
  2. How to convert a String to an Integer in Java?
  3. How do a check that a string contains a valid date?

Recent answers

  • Use of FactoryBean’s with Spring JavaConfig
  • Generating a random integer
  • Unzip a file using Java
  • Stop JTextField from expanding in BoxLayout
  • How to control volume of audio Clip