Hello,
I want to extract any text in between "P " and " (" and split them into different rows from a string. I was trying to use the RegEx tool, but can't figure out how to extract the text without that " ("
String: P Pizza (ODP)-10P Flower (EJW)-40, P Brain (VID)-12P Earth (LIW)-20
Regular Expression: [^%]+[(]
Result:
Pizza (
Flower (
Brain (
Earth (
After this, I will have to write a formula to get rid of " ("
Is there a way to get rid of " (" in one setting when I use the RegEx tool?
Thank you!
Yizhou
Solved! Go to Solution.
Hey @YizhouZhang
Try this Regular Expression:
(?:%)(.+?)(?:\s|\(|$) - edit: without the trailing spaces at the end.
It worked fine here.
You can also read this article on RegEx, it helps a lot to understand how the Tokenize mode functions.
https://community.alteryx.com/t5/Alteryx-Knowledge-Base/Tool-Mastery-RegEx/ta-p/37689
Cheers,
Thank you very much!