Regex pattern needed

后端 未结 1 1468
生来不讨喜
生来不讨喜 2021-01-29 08:36

If have below text:



        
1条回答
  •  生来不讨喜
    2021-01-29 09:20

    You can use the following to match:

    \['newPrice'\] ='([\d.]*)'|\['oldPrice'\] ='([\d.]*)'|\['price'\]\['value'\] = '([\d.]*)'
    

    And extract $1 as newPrice, $2 as oldPrice and $3 as value.

    See DEMO

    0 讨论(0)
提交回复
热议问题