I have a dataframe:
A_1 |
---|
AB546-RT GTY 3 |
BYU345 456 2 |
AB546 HYT 1 |
BYU345 BWER 34 |
And, a search list of [546, 345]. If the string has any number of search list, then the whole string is extracted.
I would like to make a new column of the alphanumeric string without the other part of string like this
A_1 | A_2 |
---|---|
AB546-RT GTY 3 | AB546 |
BYU345 456 2 | BYU345 |
AB546 HYT 1 | AB546 |
BYU345 BWER 34 | BYU345 |