Hello,
I need your help with removing a text partially from rows: for example, I need to remove any text before "LF" in a row.
For example, I have these 3 texts:
abcdfgrLFxyzw
fgtrVHbnLF56thfi
bGNTzucd456
For the first row: I need to remove abcdfgr and keep only LFxyzw
For the 2nd row: I need to remove fgtrVHbn and keep only LF56thfi
I used RegEx to remove any text before LF BUT now I noticed that the rows that have no LF are marked as Null:
When I use the RegEx, the 3rd row appears as Null instead of showing up exactly as is: bGNTzucd456
How do I remove the text before LF only in the rows that have LF in them and not affect the other rows (that don't have this text LF in them)?
Your help is greatly appreciated!
Kind regards,
Ioana
Solved! Go to Solution.
You can use an If statement to check if LF exist and apply regex only on them.
IF Contains([Input], "LF")
THEN REGEX_Replace([Input], ".*(LF.*)", "$1")
ELSE [Input] ENDIF
Workflow:
Hope this helps : )
@atcodedog05 thank you so much for your help! It worked! I didn't know that we could combine both the IF statement and RegEx. I learn new things every day it seems!
Have a wonderful day!
@OllieClarke hello! thank you for your help! it worked!!! and it was so easy. It seems I wasn't using the RegEx at its full capacity. I wasn't seeing the forest from the trees.
this solution is quite fast and efficient. I appreciate your time!
Regards,
Ioana