in reply to Re^3: Parse string and extract word after specific pattern
in thread Parse string and extract word after specific pattern
Apparently, the first argument to split is always treated as a regex, because split '\.', $s worked.
The documentation implies a string and a regex are treated differently:
(such as ' ' or "\x20" , but not e.g. / / )
Seems that, as luck would have it, I never happened to use a regex meta character split 'x'.
In light of the described differences in handling of ' ' vs / /, the documentation should state that the first argument is always treated as a regex even supplied as a string.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Parse string and extract word after specific pattern
by choroba (Cardinal) on Mar 28, 2017 at 07:58 UTC |