in reply to Re: Storing String from Line Before Regex Match
in thread Storing String from Line Before Regex Match

I notice the character class  [A-Za-z0-9 _ ( )] with two extra space characters. Just out of idle curiosity, is this done to enhance visual presentation/readability, or for some other reason?

Update: Also: What is the purpose of the  $searchfor string?


Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^3: Storing String from Line Before Regex Match
by tybalt89 (Monsignor) on Apr 02, 2017 at 01:22 UTC

    I just left the OP's character class code as it was. I don't know why he had multiple spaces in there.

    I had tried several different solutions before deciding to just modify the OP's regex. The $searchfor string is left over from an early test version, it should be removed. In fact, I think I'll go do that now. Thanks for the catch.