in reply to Re: Regex - one and only one / at beginning and end of file path
in thread Regex - one and only one / at beginning and end of file path
I don't know how fast it is, but I generally prefer substr over RegExes in fixed-width-fixed-content problems.unless ('/' eq substr($directory, 0, 1) and '/' eq substr($directory, -1, 1)) { ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Regex - one and only one / at beginning and end of file path
by Aristotle (Chancellor) on Dec 15, 2003 at 08:14 UTC | |
by CombatSquirrel (Hermit) on Dec 15, 2003 at 18:52 UTC | |
by Aristotle (Chancellor) on Dec 15, 2003 at 20:19 UTC |