Answer the question
In order to leave comments, you need to log in
How to remove a number along with adjacent characters with a regular expression?
When parsing, I encountered duplication. I get the same items but with an insert somewhere in the string as '1st', '2nd', '3rd', '4th' and in different languages like French '6ème'.
I know that you can remove numbers through a regular expression using '\d'.
How can I immediately remove everything that comes after the number before the space?
It is possible to go through the whole thing in a loop, but maybe there is a more elegant way?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question