Regex - Getting string in middle

Hi
“Company name Mexico”
I need to get Mexico from this using Regex. Any help appreciated.:slight_smile:
Thanks!

Hi @abivanth.r

(?<=Company name).*

System.Text.RegularExpressions.Regex.Match(Input,"(?<=Company name).*").Value.Trim()

Regards

@abivanth.r

image

(?<=Company\s*name\s*)[A-Za-z]+

Hi @abivanth.r

Check the below image for better understanding:

Regards

THANKS!!!
worked

1 Like

Hey @abivanth.r
System.Text.RegularExpressions.Regex.Match(yourInputVariable, "(\w+)$").Value

@abivanth.r

Is my regular expression not works for you

@abivanth.r

Perfect. So the topic can be closed. Please mark my post as solution to close the loop.

Regards

Thanks bro! Working:)

1 Like

Is there any documentation or courses for learning Regex?

Hi @abivanth.r

Check the below videos

Regards

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.