Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
["|']|\[|\]
/
gm

Description

removes brackets from a string array -- used to parse docker-lift CLI ports, volumes, depends_on, etc

[redis,mysql,cache]

becomes

redis,mysql,cache

Submitted by anonymous - 6 years ago