I have a string
"{1} {2} {4} {abc} {abs}"
and the regular expression
/\{(.+)\}/g
In PHP regular expressions i can use modifier "U" (U modifier: Ungreedy. The match becomes lazy by default). If i use /\{(.+)\}/gU
my response looks like this:
Array (5) [ "1", "2", "4", "abc", "abs" ]
In javascript no modifier U. Without this modifier my response looks like this:
Array (1) [ "1 2 4 abc abs" ]
How i can do this?
.+?
... There's no option to do it by default but you can always do it manually... – SupervisionArray (5) [ "1", "2", "4", "abc", "abs" ]
? – Megaspore