Extract part of the string

后端 未结 2 593

I need to extract part of the string while looks like this for example:

01.   Artist Name - Song Title

So I have

2条回答
  •  Happy的楠姐
    2021-01-16 23:27

    Just split the string on the separator and pop of the last part :

    var lastPart = str.split(separator).pop();
    

    FIDDLE

提交回复
热议问题