RegEx - How to Extract Price?

前端 未结 5 569
名媛妹妹
名媛妹妹 2020-12-06 19:19

How would I extract the dollar amount from the following string

\"some text will go here and more and more and then there will be some price $34.03 but that doesn\'t

5条回答
  •  -上瘾入骨i
    2020-12-06 19:37

    Since you don't mention a specific regex engine, you might have to adjust this a bit:

    /(\$\d+(\.\d+)?)/
    

提交回复
热议问题