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
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: 41506
    
  53
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 - my free Android networking tools app
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19670
    
  18

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: 19670
    
  18

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: 19670
    
  18

Bad Oracle. BAD Oracle!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regex