aspose file tools*
The moose likes Features new in Java 7 and the fly likes Regex 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 » Features new in Java 7
Bookmark "Regex " Watch "Regex " New topic
Author

Regex

Rishabh Shah
Ranch Hand

Joined: Nov 30, 2010
Posts: 36
There is features in 7 version of regex. How to use it in jsp or any class for validation as i want regex which must have alphabets and space(optional). how to make it ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
I don't think there's anything new in Java 7 specifically about regexps. What, exactly, about you referring to? Or are you saying that you are using Java 7, and are struggling with its regexp features? If so, start here: http://download.oracle.com/javase/tutorial/essential/regex/


Ping & DNS - updated with new look and Ping home screen widget
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19556
    
  16

Regex support through the java.util.regex package has been available since Java 1.4. Java 5.0 added a few features (quoting being the most important), Java 7 only added constant Pattern.UNICODE_CHARACTER_CLASS.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Rishabh Shah
Ranch Hand

Joined: Nov 30, 2010
Posts: 36
ok...Thanks
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Rob Spoor wrote:Regex support through the java.util.regex package has been available since Java 1.4. Java 5.0 added a few features (quoting being the most important), Java 7 only added constant Pattern.UNICODE_CHARACTER_CLASS.

Java 7 also added named regex groups.


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19556
    
  16

No wonder I missed it - the Javadoc page is missing the "since 1.7" tag.
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Indeed. Also the Matcher class is missing that tag.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19556
    
  16

Bad Oracle. BAD Oracle!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regex
 
Similar Threads
Regex
problem in getting date and time in textbox
treating variable as regex
Using regex in a Recursive Descent Parser
Soap turning non-ascii chars to garbage