in reply to Regex help
Note that the Microsoft UNC Naming convention allows spaces, and many characters - in fact, the LONG UNC REQUIRES '//?/', so the regex above will need editing. The best bet is to look for a terminating delimiter, for your use case.$ perl -e 'my $x=shift; print qq|$x\n|; print $x=~m/(\\[\\\w]+)/,qq|\n +|' 'some \\text\with\backslashes and stuff' some \\text\with\backslashes and stuff \\text\with\backslashes
All great truths begin as blasphemies.
― George Bernard Shaw, writer, Nobel laureate (1856-1950)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex help
by CountZero (Bishop) on Apr 01, 2012 at 18:57 UTC | |
by NetWallah (Canon) on Apr 01, 2012 at 19:07 UTC | |
by CountZero (Bishop) on Apr 01, 2012 at 19:11 UTC | |
by JavaFan (Canon) on Apr 01, 2012 at 23:29 UTC |