Regular Expressions 101

Community Patterns

Extract content of code which start with a curly bracket and ends with a curly bracket followed by closing parenthesis

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(?<=^\$translateProvider\.translations\('de', {)[\s\S]*(?=}\)$)
/

Description

answer demo for stack overflow question:

Extract content of code which start with a curly bracket and ends with a curly bracket followed by closing parenthesis

Submitted by anonymous - a year ago