How to write regular expressions
-
Hi
I want to separate only the numbers in brackets [test10] [test25] [test30].
I tried. I wrote the regular expression below to extract the contents.
regex("(?<=\[)[^]]*(?=\])")result : test10, test25, test30 (remove parentheses)
But it couldn't separate alphabets and numbers.
I want to write a regular expression that can extract only the numbers in parentheses.
And I want to put that number in a list.
list.append(10)
list.append(25)
list.append(30) -
Hi
I want to separate only the numbers in brackets [test10] [test25] [test30].
I tried. I wrote the regular expression below to extract the contents.
regex("(?<=\[)[^]]*(?=\])")result : test10, test25, test30 (remove parentheses)
But it couldn't separate alphabets and numbers.
I want to write a regular expression that can extract only the numbers in parentheses.
And I want to put that number in a list.
list.append(10)
list.append(25)
list.append(30)