aspose file tools*
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 Spring in Action this week in the Spring 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!!!

 
Don't get me started about those stupid light bulbs.
 
subject: RegEx why does this simple expression not work?