Regular basic problem

regular cabbage, please guide me! Whether the
rules are exactly the same in different languages, such as php, js. The regular expressions I test on some website regular tools are not correct when written in PHP.

in addition, find a regular way to write a paragraph:
get a piece of text in a document, get curly braces, and its contents, and find the
of the php version. < scritp > var json_txt= {.} < / scritp >.

Mar.20,2021

is generally consistent, but not complete, and the regularities of JS have been castrated, such as JS does not support post-assertion.

JS version:

$pattern = '/\{[^{}]+\}/'; -sharp phpgpreg_match_all
preg_match_all($pattern, 'Hello {world}, { {}', $matches);
var_dump($matches);
Menu