Below is the text I am working with.
Hello my name is Adam (age: 25) I live in US.
Hello my name is Bill (age: 23) I live in Asia.
I am trying to extract the age and location using lookahead and lookbehind.
The desired output format should be as follows.
["25, US", "23, Asia"]
This is how much progress I have made so far.
(?<=age: ).*?(?=$)
When using the JavaScript match function, I am getting this array.
["25) I live in US.", "23) I live in Asia."]
I tried replacing .*?
with [0-9a-zA-Z]
but it doesn't seem to be effective.