I'm stuck on the cleanest way to accomplish two bits of regex. Every solution I've come up with so far seems clunky.
Example textMatch: Choose: blah blah blah 123 for 100'ish characters, this matches NoMatch: Choose: blah blah blah 123! for 100'ish characters?, .this potential match fails for the ! ? and .
The first regex (?:^\w+?:)(((?![.!?]).)*)$ needs to:
- Match a line containing any
wordfollowed by a:so long as!?.are not found in the same line (theword:will always be at the beginning of a line) - Ideally, match every part of the line from the example EXCEPT
Choose:. Matching the whole line is still a win.
The second regex ^(^\w+?:)(?:(?![.!?]).)*$ needs to:
- Match a line containing any
wordfollowed by a:so long as!?.are not found in the same line (theword:will always be at the beginning of a line) - Match only
Choose:
The regex is in a greasemonkey/tampermonkey script.