Find the pattern “[Number1, Number2]” in any given string and get the integer (32bit) values for Number1 and Number2:
Example Input: “Foo Bar [45,66] Bash”
Example Result:
Number1 = 45
Number2 = 66
I have this example in my deitel book and I can’t seem to get the Regex Exp. syntax correct. Can anyone help me out?
This should work for your exact case of
[number,number]:Tested a myregextester.com.