File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes java.util.regex.Pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "java.util.regex.Pattern " Watch "java.util.regex.Pattern " New topic
Author

java.util.regex.Pattern

Dave Jones
Ranch Hand

Joined: Feb 20, 2005
Posts: 77
Hi
I want to check my input string that it contains only the characters:
a-z, A-Z , 0-9, [,],{,},/,,, ,_,

I was told I can use a Pattern , but when looking it up, I didn't find what I need, can anyone shed some light here ?
Thanks
p.s - I know I could do it the hard way by running a char char check, but I want to avoid that way
Steve Morrow
Ranch Hand

Joined: May 22, 2003
Posts: 657



/* Edit */
I really need another cup of coffee...
[ April 07, 2005: Message edited by: Steve Morrow ]
Ryan McGuire
Ranch Hand

Joined: Feb 18, 2005
Posts: 1007
    
    3
Originally posted by Dave Jones:

I was told I can use a Pattern , but when looking it up, I didn't find what I need, can anyone shed some light here ?
Thanks


Are you saying you didn't find the Pattern javadoc? Try here.

For a little sample code that uses Pattern, look this discussion.

Does that clear it up?

Ryan
[ April 07, 2005: Message edited by: Ryan McGuire ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.util.regex.Pattern