- or download this
'oh {hello there' =~ /
([{]{0,1}) # Matches '' (after some backtracking)
hello # Matches 'hello'
(?(1)\}) # Matches ''
/x;
- or download this
'oh hello} there' =~ /
([{]{0,1}) # Matches ''
hello # Matches 'hello'
(?(1)\}) # Matches ''
/x;
- or download this
/
{hello} # '{hello}'
...
hello # 'hello'
(?! } ) # Not followed by '}'
/x