How to remove everything after comma

i want removed all content after comma find comma

like artist name have
Shashwat Singh, Poorvi Koutish
i wants
just this Shashwat Singh

please help me thanks

You could try an action of the type "Replace with regular expression"
Search string: ,.*$
Replace string:
(leave empty)
or an action of the type "Guess value"
Source: %artist%
Target: %artist%, %dummy%

1 Like

here is the code i am trying to export this <a href="$lower($replace(%artist%, ,-))">%artist%</a>
how to removed everything after comma find

i dont wants just comma removed All Character after comma

see the help on the correct syntax for scripting expressions:

I do not see the place where you want to remove everything following the comma.
The $replace() statement that you use replaces a blank with a hyphen.

To deal with a pattern, you would have to use a regular expression, or the $regexp() function in scripting, e.g.

Would you please try it first?

$regexp(%artist%,',.*$',) its work but now how replace space to - this ?

you can use them as nested expressions:
$replace($regexp(%artist%,',.*$',),' ',-)

great thank you

if i want to cut before coma all text how gonna work this ?
like Shashwat Singh, Poorvi Koutish
just this Poorvi Koutish

like this:
$regexp('Shashwat Singh, Poorvi Koutish','.*, ',)

how to use if function there ? its possbily ?

This is a very general question.
have a look at the links I provided a couple of posts above.
You will find
so if you want to do a comparison "if artist equals this, then do a) else do b)"
it would look like this
set whatever you want to be done instead of "a" and instead of "b"

But It may be easier to use filters and so first treat the "a" cases and then the "b" cases"

$lower($replace($regexp(%artist%,'.*, ',),' ',-))
this will gentore after comma
now i wants if dont have comma its will empty

Sorry, now I am a little lost what you mean
and also what you want.

Is it that you want to check if there is a comma and if so: do it.
And if there is no comma: do not do anything except replace space with hyphen?

if dont have comma (2nd artist) all code will be empty
<a href="$lower($replace($regexp(%artist%,'.*, ',),' ',-))">$regexp(%artist%,'.*, ',)</a>
default displaying 1st artist if dont have 2nd artist

Artist name: <a href="$lower($replace($regexp(%artist%,',.*$',),' ',-))">$regexp(%artist%,',.*$',)</a>, <a href="$lower($replace($regexp(%artist%,'.*, ',),' ',-))">$regexp(%artist%,'.*, ',)</a>
if i have one artist name its showing dublicket if have 2 two artist name that's fine

Yes, this is the way the regular expression function works: if there is no hit for the pattern, then you get the source string back.
As I said: filtering would be an option.