Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.
Extracting a number from a string under specific conditions
Hi,
I'm struggling on doing something that looks easy (and maybe dumb), but I don't find a way. I need to extract a number from a string that matches specific conditions. I have a column with different strings like:
John Alpha U23 |
Mike Beta C57 |
Ann Cole U73456 |
Amy Utta J94857 |
I want RM to create a new colum that picks only numbers where there is the U in front and leave blank (or put something like none) on the other rows
23 |
none |
73456 |
none |
I'm not able to uniquely identify strings that contains both U and a number after. Is there a way to do that without using python or generativeAI blocks? By using a Split block with a regular expression like [^U[0-9]]{1,} it picks also the U of Amy, while I want select U only if it has followed by a number.
Thanks,
Paolo
Tagged:
0
Answers
Dortmund, Germany
xkcd: Regular Expressions