I am trying to use a regular expression to get the value after a character. In this case, the string is m325 , and I need to get everything that is after m .
Can someone tell me what is wrong with my code?
Regex rgMeter = new Regex("m(.+$"); intMeterID = Convert.ToInt32(rgMeter.Match(strID));
Update:
Thanks for all your answers ... for some reason, the regular expression "m (. +) $" Returns m, as well as the string I need. I tried the βGroupsβ example and it returns the data I want. Why do I need to use groups?
source share