I have a regex that looks like this to extract order numbers from columns:
df["Orders"].str.extract('([0-9]{9,10}[/+ #_;.-]?)')
The orders column can look like this:
12
123456789
1234567890
123456789/1234567890
123456789/1/123456789
123456789+1234567890
The resulting new column in the dataframe after the regex should look like this:
NaN
123456789
1234567890
123456789/1234567890
123456789/123456789
123456789+1234567890
However, with my current regex I'm getting the following result:
NaN
123456789
1234567890
123456789/
123456789/
123456789+
How can I get the result that I'm looking for?