This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes RegEx why does this simple expression not work? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "RegEx why does this simple expression not work?" Watch "RegEx why does this simple expression not work?" New topic
Author

RegEx why does this simple expression not work?

Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
Anyone see the 'obvious' reason why my ReEx of

^/[a-z]+/[a-z]+/[a-z]+$
allows
/some/text/here

But the RegEx of
^/[a-z]+/[A-Za-z0-9]+/[a-z]+$
does not allow
/some/Text123/here

Surely (by my understanding) all I'm doing is extending the a-z to allow
uppercase & numeric characters.
Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
OK forget it, it was/is working, it's just Eclipse being 'reliable'. A clean of my project and suddenly it seems the RegEx is a match!!!

 
 
subject: RegEx why does this simple expression not work?
 
Similar Threads
How to mask string not conforming to a regular expression pattern
Regex in Java: finding expression 1, but not if it's part of expression 2
Please help me check this regex
Regex
precedence prob. again..this time 4rm RHE...very urgent