I am trying to split a cell into separate columns using the keyword Long with a Regex tool as shown below, however the issue that I am running into is that when the tool finds the word along it uses that to split the cell. Is there a way to prevent the tool from using along to split the cell so it is split in the correct place or another method I should use? I have also included a small chart with some data to use.
Cell to be split | Current 1st Split Cell | Current 2nd Split Cell | Desired 1st Split Cell | Desired 2nd Split Cell |
Short Term: Banker training and guidance criteria for TWC to be included along with WLS guidance Long Term: Early engagement of Trade as this is a Product Management and client preference direction (deal by deal) - Banker and WLS training | Short Term: Banker training and guidance criteria for TWC to be included a | long with WLS guidance Long Term: Early engagement of Trade as this is a Product Management and client preference direction (deal by deal) - Banker and WLS training | Short Term: Banker training and guidance criteria for TWC to be included along with WLS guidance | Long Term: Early engagement of Trade as this is a Product Management and client preference direction (deal by deal) - Banker and WLS training |
@MattR79 If 'Long' is always capitalised, untick 'Case Insensitive'?
Hi @MattR79 ,
RegEx
(?<!a)long
will match 'long' but will not match with 'along'.
For detail, please check 'negative lookbehind' on the page below.
https://www.rexegg.com/regex-lookarounds.html
You could also include \b to mark word boundaries:
(.*)(\bLong\b.*)
Or given your data, you could increase the search term to Long Term:
(.*)(Long Term.*)
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |