javascript - How to return multiple match with regexp? -


this question has answer here:

i tried code:

/\[\[(.*?)\]\]/g 

to return multiple matches text this: [[text]] , [[more]] text. instead oftext, more, returns text. doing wrong? in advance.

the regex ok:

var test = "[[text]] , [[more]] text.".match(/\[\[(.*?)\]\]/g); console.log(a); > ["[[text]]", "[[more]]"] 

Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -