Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Thanks that solved my question :) Commented Dec 15, 2019 at 18:43
  • That's doing a partial regexp match, not a partial string match. You'll notice the difference when your input contains regexp metacharacters. The OP didn't say it had to be a partial match at the beginning of the line. Commented Dec 16, 2019 at 21:23