Hello, there is a certain set of lines, such as "L / Красный / 12345" , how can you find them on the page, and cut out of them everything that is after the "/" symbol (and with it). the strings are different, so that in each of them the characters up to this sign remain intact. Help me please.

    1 answer 1

     var arr = str.split('/'), changeStr = arr[0] || ''; 

    can be regular

     str.match(/([^\/]*)/)