Splitting text by 2nd apperance of word

Hi all

I’m trying to split this section of text - Kitchen Cooke New World FL 15.8 KW/h Yes N/A N/A Yes N/A High: High: Yes No Yes Yes r - / New Low: Low: Gas home MJ175GO L Utility Boiler Ideal / RS 11.6 KW/h Yes N/A N/A Yes Pass High:0.000 High:0.000 Yes No Yes Yes Room - Gas Logic + 5 5 Under Heat 18 Low:0.000 Low:0.000 70kw 7 7 - by the first and then the second KW/h.

I thought it would be strVariable.Split("KW/h"c)(1) but c is only for a character, not a word.

Can someone advise please?

Thanks :slight_smile:

Hi @Short

Your Expression would be like below!

Split(YourStringVariable,“KW/h”)(1) will result after the KW/h after sentence!

Regards

grafik
the Split(String Array, StringSplitOptions) method signature will serve for it

@pravin_calvin @ppr thank you both so much for your help! :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.