Js regular expression extracts the specified character

has a paragraph of characters

<span style="color:rgb(85, 255, 255)"></span>

want to extract and replace it with

jian85255255

wrote a simple match like this

[\u4e00-\u9fa5]\<span.style\=\"color\:rgb\(

but only match

 1 :
<span style="color:rgb(

how do I extract three commas from a color? And replace that Chinese character, if not, just draw a comma.

solve

Mar.20,2021

html.replace(/(.)<span style="color:rgb\((\d+), (\d+), (\d+)\)">(.*?)<.*?>/g,'jian$2$3$4$5')

http://regex.zjmainstay.cn/r/.

Menu