Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Hardik Trivedi
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.
 
David Newton
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.
 
Henry Wong
author
Marshal
Pie
Posts: 20989
76
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
 
Rajeev Trikha
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.
 
Campbell Ritchie
Sheriff
Posts: 48635
56
  • 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