How would I use Regex to...

Do you have a list of strings that you want to process? To use regex like that you would really need a more general format. Do you want to extract the last four chars in a string? Any occurances of two digits followed by two letters? The third word in each string?
 
Its a really long string, and I want to extract a couple key expressions, such as the example above. I guess I need to
1. Check that the expression exists
2. Extract it.
3. Replace the expression with something more meaningful.

For example, I have a paragraph (it's an error message), and I want to replace:

"Remote Company 10LC"

with

"London"
 
Of, IndexOf, is plenty enough, but I was just asking if there was a better way to do it with Regex, as I'm replacing quite a few of these strings in a body of text.
 
Back
Top