Community Patterns

Community Library Entry

1

Regular Expression
Created·2021-09-28 12:40
Flavor·PCRE2 (PHP)

/
(\b[^()]+\b)\s*\(\s*(\b[^()]+\b)\s*\)
/
gm
Open regex in editor

Description

How do I extract then some text A, some text B and some text C if they are in the format

some text A ( some text B ( some text C)) Please mind that in some cases may be only

some text A ( some text B)

https://stackoverflow.com/questions/69047224/how-to-fetch-text-strings-in-regex-in-the-format-abc

Submitted by anonymous