File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need Regular Expression

 
kayanaat sidiqui
Ranch Hand
Posts: 122
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In my code i have a string.
Now in this string i need to print a warning message, if contains
any character other than (A-Z,a-z,0-9,_)

I tried to do with contains([A-Za-z0-9_])and pattern().
But could not get through.

Where am i doing mistake. Can you please point it out..

Tahnks,
Kaya.
 
Rob Spoor
Sheriff
Pie
Posts: 20380
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the API of java.util.regex.Pattern. It clearly specifies how to create an "Any character except" character class.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic