Hi,
I have the below set of values. How can I remove the "on ROLENAME" and "on TEAMNAME" from each cell.
WAM Control - Role - Autosys-JobManager-Team on ROLENAME |
WAM Control - Team - Web Dev Corp Finance on TEAMNAME |
Thank you for your help.
Regards,
Florence
Solved! Go to Solution.
Hi @fjlorenzo
RegExReplace([Field],' on (ROLENAME|TEAMNAME)$','')
will remove the " on ROLENAME" or " on TEAMNAME" if they come at the end of the string
Hope that helps,
Ollie
Does every line have an 8 character thing you need to remove? If this is the case you can say LEFT([ColumnName], Length([ColumnName])-8)
If you want to remove rolename and teamname you could do Replace([ColumnName], " ROLENAME", "") and Replace([ColumnName], " TEAMNAME", "")
@OllieClarke I love the fancy regex solution. Kudos!
Thank you ShankerV. Can you explain did this "(.+)(\s\w{2}\s\w{8})$" removed those words?
Thank you BrandonB. Yes,every line has 8 characters that needs to be remove at the end of the string.
Thank you OllieClarke.
Thank you all for all your suggestions. All are good.😊
Hi @fjlorenzo
Please be informed that, the items within () are called group.
I have segregated the input in 2 groups.
First group - (.+)
Second group - (\s\w{2}\s\w{8})
$ demotes to end of the string
Then in the output method I have used the Replace option, so that first group is written in the cell.
Note:
\s denotes space
Input was:
Output is after removal of words.
Many thanks
Shanker V