I want to get a sequence of numbers that is at the end of a line. eg.
string contentDbIndex = Regex.Match("ab56cd1234", @"\d+").Value;
gives a result of 56 , but I want the result to be 1234 . How can I do it?
56
1234
You can use the end of the anchor ( $ ) as follows:
$
string contentDbIndex = Regex.Match("ab56cd1234", @"\d+$").Value;
Source: https://habr.com/ru/post/944863/More articles:Arrays are redefined in Java - javaProblems with std :: chrono - c ++Install APN programmatically on Android - androidrendering in the context of web development - renderingBuild predicates with lenses - haskellHow to get the index of an element by xpath? - indexingupload large video using chunks via http post - httpAvoid name collision with cake pattern - scalaHow to generate a 64-bit .dll, which gcc compiler or another. Unable to load IA 32-bit.dll on AMD 64-bit platform - javaRemoving MongoDB collections using regex - mongodbAll Articles