Regular Expressions 101

Community Patterns

Remove Text after Parenthesis

0

Regular Expression
PCRE (PHP <7.3)

Description

/ ).$ / gm ) matches the character ) literally (case sensitive)

. matches any character (except for line terminators)

  • matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy) $ asserts position at the end of a line
Submitted by Dan - 3 years ago