I have a string I need to split using a Regex. I could use the split methods in .NET but the string to return could be the first or second substrings. This regex will become a configurable setting in an application.
A typical string would be 9234567X123456-789
I've create the following regex
[-09]([^X]*)X
to return the first substring. However, I lose the first digit, 234567 is returned.
Any ideas?
Thanks.