The following regex pattern \d+ works fine for most of my use cases when I do a match to extract all possible digits from a string:
let extractedNums = string.match(/\d+/g);
However, it also matches a number that is immediately followed by a non-digit character, where I instead want to ignore it for example; "he came in 2nd place".
The regex should NOT extract the "2nd" in the above string aswell as a digit as it also contains letters "nd".