This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Java in General and the fly likes Regular Expresion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Regular Expresion" Watch "Regular Expresion" New topic
Author

Regular Expresion

Naresh Rajan
Ranch Hand

Joined: Sep 08, 2005
Posts: 45
hi,
I am trying to match a string which can contain any digit except 6 as the first charecter. Can anyone please let me know how I do it.

Regards.


Am not a pro and thats why am here!!!
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13884
    
  10

Have you looked at the API documentation of class java.util.regex.Pattern? It explains how to make a Java regular expression.

What did you try out yourself and how did that work out?


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Piet Verdriet
Ranch Hand

Joined: Feb 25, 2006
Posts: 266
Here's a demo:

Details: http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html

Good luck.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regular Expresion
 
Similar Threads
Testing
Brain Teasers
May 31, 2001 - test Job Offer $xxx,xxx Colorado Springs
No Banner for JSF book promo?
Idle's mind is a devils workshop