skcrpk skcrpk -3 years ago 165 Question

regex pattern number inside brackets (int)

Have a text

hjgv ygkuy (1) erg erg ewr (2)erg erg erg er. (3)

want to get 1,2,3 and if there is only one then just 1

i have tried with

i get matches but i want the result like


if just one then just that digit 1

Answer Source

Try using capturing groups;



Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download