Regular Expressions 101

Community Patterns

1...456

Remove all parenthesis and all text within them

0

Regular Expression
PCRE (PHP <7.3)

/
*\([^)]*\) *
/
g

Description

Removes all occurrrences of parenthesis () and whatever text is within them "text", eg.: ( text )

Submitted by anonymous - 7 years ago