If I have a string like
6d7411014f
I want to read the the occurrence of first two integers and put the final number in a variable
Based on above example my variable would contain 67
more examples:
d550dfe10a
variable would be 55
What i’ve tried is \d but that gives me 6. how do I get the second number?
I really can’t answer this exactly in Ruby, but a regex to do it is:
Then you have to concatenate
$1and$2(or whatever they are called in Ruby).