A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
What is meant by [^a-zA-Z]
Joined: Jan 30, 2010
Jan 31, 2010 07:29:18
I come with the [^a-zA-Z]
especially in searching.
Can i know what is that and how JVM compiler deals with it.
Joined: Sep 29, 2008
Jan 31, 2010 07:32:38
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.
Joined: Sep 28, 2004
Jan 31, 2010 07:34:39
If you look again, you will see the syntax is not a
syntax, but part of a
that is passed to the regex engine.
I recommend starting with a tutorial on regular expressions....
Java Threads, 3rd Edition
Jini in a Nutshell
Java Gems (contributor)
Joined: Jan 29, 2010
Jan 31, 2010 12:37:18
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)
Joined: Oct 13, 2005
Jan 31, 2010 13:58:04
Agree with Henry about tutorials;
is another good one, in the Java™ Tutorials
subject: What is meant by [^a-zA-Z]
Jakarta RegExp - Email Validation
help requested with regular expressions
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013