• Post Reply Bookmark Topic Watch Topic
  • New Topic

unix path Regex  RSS feed

 
Sharon whipple
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this windows path Regex that works fine :
([a-zA-Z] \\w+)*\\[a-zA-Z0_9]+)?

I need help with unix path regex.
will it be:
((\\w+)*\\[a-zA-Z0_9]+)?

Thank you
Sharon
[ May 12, 2008: Message edited by: Sharon whipple ]
 
Guido Sautter
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The file path separator on Unix/Linux is '/', while it's '\' on Windows, and your RegEx matches only the latter ...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!