Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
author
Marshal
Posts: 23438
138
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Marshal
Posts: 58414
178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agree with Henry about tutorials; here is another good one, in the Java™ Tutorials
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!