in reply to
Match whitespace or start-of-string with lookbehind
In general you need one alternative lookbehind for each possible length:
(?:(?<=^)|(?<=\s))
. In this case you can negate it to make the lookbehind always one character:
(?<!\S)
.
Comment on
Re: Match whitespace or start-of-string with lookbehind
Select
or
Download
Code
In Section
Seekers of Perl Wisdom