What is the best way to remove all text in a string after a specific character? In my case "=" and after another character in my case a ,, but keep th
,
$a="some text =keep this,but not this" $a.split('=')[1].split(',')[0]
returns
keep this