Regular Expressions 101

Community Patterns

Remove spaces between brackets

1

Regular Expression
ECMAScript (JavaScript)

/
([[(])+\s*(.*)\s+([\])])
/

Description

Removes space after opening and before closing square and reqular brackets/parenthesis and keeps what's inside

Submitted by anonymous - 8 years ago