aspose file tools*
The moose likes Beginning Java and the fly likes What is meant by [^a-zA-Z] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What is meant by [^a-zA-Z]" Watch "What is meant by [^a-zA-Z]" New topic
Author

What is meant by [^a-zA-Z]

Hardik Trivedi
Ranch Hand

Joined: Jan 30, 2010
Posts: 252
Hi... friends

I come with the [^a-zA-Z] pattern especially in searching.
Can i know what is that and how JVM compiler deals with it.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Have you checked out any Java regex tutorials/documentation? There's quite a lot available on the web, and it would answer your question very quickly.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18845
    
  40


If you look again, you will see the syntax is not a java syntax, but part of a string that is passed to the regex engine.

I recommend starting with a tutorial on regular expressions....

http://www.regular-expressions.info/tutorial.html

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Rajeev Trikha
Ranch Hand

Joined: Jan 29, 2010
Posts: 85
It is worth spending time on learning about regular expressions as they would become indispensable part of your toolset. The shorthand you have shown just means 'not an alphabetic character' but dig deep it is worthwhile.


Rajeev Trikha (SCJP 6)
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38873
    
  23
Agree with Henry about tutorials; here is another good one, in the Java™ Tutorials
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is meant by [^a-zA-Z]