Problem creating a $if string that allows you to locate word that isn't alone in the field and is surrounded by other words

Hi

I’m struggling to find a way to create a format string that is using "If" and "contains” commands.

Or more specifically commands that “automatically fill other fields with specific identifier tags when a specific tag is present in a different field altogether.

I’ve been successful in creating format strings like this one below:

$if($eql(%artist%,'Sizzla'),%CONTENTGROUP% - 'J.A.:jamaica:',%contentgroup%)

Which give the result of Putting J.A.:jamaica: in Contentgroup Field if the name Sizzla is in the Artist field.

Starts out like this:
Contentgroup: "blank"
Artist: Sizzla

then after i select this $if($eql(%artist%,'Sizzla'),%CONTENTGROUP% - 'J.A.:jamaica:',%contentgroup%) action to be executed it will then fill content group to look like this

Contentgroup: J.A.:jamaica:
Artist: Sizzla

One of my main problems is the artist's name can only have the word “sizzla" by itself in the specific case-sensitivity or else the formatting will not show up in the Content group field.

is there a format string with the right scripting that can make it so no matter what the case sensitivity and if other artist names are present in the same field that it will just zone in on the fact the artist name is present in the artist field so the format string command/action group I create should be executed anyways?

Basically like what the "matches word option" does in the "replace action window" that you can select in the "add action group" feature.

I would really appreciate some help on this.

Thanks

To check if a string is part of another string, use $strstr().
If you want to ignore the case, then force the case of the comparison strings to be all lower case.
e.g. $if($grtr($strstr($lower(%artist%),'sizzla'),0),%CONTENTGROUP% - 'J.A.:jamaica:',%contentgroup%)

AWESOME THANK YOU, it worked so far I haven't found any loop holes where it doesn't work yet.

Another idea that might help me a lot is i've created. a bunch of categories with action groups that I run as kind of a "Sweep" during batch editing.

Is it possible to create a string that makes it so "if the alteration these strings are suppose to create already exist in the intended field then ignore adding the alteration again."?

it becomes like a duplicate scenario for me alot if i'm not careful. So, a way of creating a fail safe would be amazing.

Thanks again

Could you give a real example with the real field names?
E.g. it is not clear to me where the alteration comes from.