File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RegEx why does this simple expression not work?

 
Kevin P Smith
Ranch Hand
Posts: 362
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 362
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!!!

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic