.net - Regex to exclude string at beginning of string -
i want exclude fixed string @ beginning, numbers after fixed string.
the fixed string re163, here examples expected result:
example result re16310000 10000 re16312345 12345 re16316300 16300
i've tried following regex:
it works these examples:
re16310000 10000 re16319999 19999
but doesn't fit that:
re16320000 320000 (expected 20000) re16316320 320 (expected 16320)
why regex? substring
enough:
string source = "re16310000"; string result = source.substring(5);
in case have use regular expressions can try
(?<=re163)[0-9]+$
pattern; c# example:
string pattern = @"(?<=re163)[0-9]+$"; string result = regex.match(source, pattern).value;
Comments
Post a Comment