Reputation: 1
I have list of strings
03000_textbox (57447)
,
03990_textbox (57499)
,
03000_textnewbox (57447)
I want to use regex to capture 1st and 2nd elements of list.
Anything that contains substring textbox
i.e.
03000_textbox (57447)
03990_textbox (57499)
Upvotes: -1
Views: 344
Reputation: 879
Here is the regex you're looking for :
[0-9]+_textbox \([0-9]+\)
Live sample : https://regex101.com/r/2oiwcF/1 Don't forget to put a global (g) flag so you can get every match and loop into.
Upvotes: 1