So i have string with digits and words for example:
1283677/10, this is my string, bla bla
And i want to take only the serial number: 1283677/10
This is what i have try:
Match match = Regex.Match(text, @"\d{8}(/\d{1,2})?");
Currently return empty.
You have 7 digits in the part before slash. So the fix is fair simple:
Match match = Regex.Match(text, @"\d{7}(/\d{1,2})?");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.