0

Hello I have a string

can there be 10\ numbers and 100 numbers in this sentence

I want to select only 10 from this and replace it with a token "number" using re.sub

if use the regex 10[^\d+] then the full match returns "10\" but I want only 10 to be selected without any leading or trailing characters or spaces. How can I do this ?

0 Answers0