'[03:22.00][03:55.00]Rain on me, rain, rain'
I want to get the lyrics through regular expressions,I tried to get the characters after "]", but this is not correct.
This regular expression should capture everything between the last closing bracket and the end of the string:
/([^\]]+$)/
'[03:55.00][05:44.22]Rain on me, rain, rain'.match(/([^\]]+$)/)
Replace is better here:
'[03:22.00][03:55.00]Rain on me, rain, rain'.replace(/.*\]/, '')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.