Remove all strings after certain symbol - syntax in String manipulation Node

Hello after long time I am here again :smiley: :man_facepalming: :sweat_smile:
Just trying to find out, the right syntax in string manipulation to get from several diferent string based on certaing string like this:
I have:
1 2 3 ESENCIA DE FLORES POWDER LAUNDRY DETERGENT
1 2 3 FUERZA AZUL POWDER LAUNDRY DETERGENT
1 2 3 LIQUID LAUNDRY DETERGENT
1 2 3 POWDER LAUNDRY DETERGENT
123 POWDER LAUNDRY DETERGENT
9 ELEMENTS LIQUID LAUNDRY DETERGENT
ACE LIQUID LAUNDRY DETERGENT

and when the string contains LIQUID to get LAUNDRY DETERGENT LIQUID
and when the string contains POWDER to get LAUNDRY DETERGENT POWDER

the strings contain different words in front of the word but I know it exists the syntax that based on key Words like LIQUID and POWDER can work what I want.
Many thanks in advance!!

I guess it is something about this syntax β€œ[^a-zA-Z0-9 +]” but I reall do not understand what symbol is what??
just need to write than no matter ho long word or numbers are in front of LIQUID in string I need to get always LAUNDRY DETERGENT LIQUID from strings like:
1 2 3 LIQUID LAUNDRY DETERGENT
9 ELEMENTS LIQUID LAUNDRY DETERGENT
ACE LIQUID LAUNDRY DETERGENT
AJAX LIQUID LAUNDRY DETERGENT

Hi @Averin7777

For this exercise you just need a β€˜Rule Engine’ node with the next expression:

$text$ LIKE "*LIQUID*" => "LAUNDRY DETERGENT LIQUID"
$text$ LIKE "*POWDER*" => "LAUNDRY DETERGENT POWDER"

I would suggest you to start a new topic for every single question. Because (i’m not saying it’s gonna happen, but if it happen) if one day you decide to assign the solution to a single post, it’s gonna be
a very hard decision :wink: . Besides that, It will be easier for other users to find their answers to similar questions.

BR

2 Likes

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