簡體   English   中英

Javascript函數使用正則表達式刪除字符串中的所有數字

[英]Javascript function to remove all digits from a string using regex

使用正則表達式從字符串中刪除所有數字的Javascript函數是什么?

>>> var s = '92393293232abc323'
>>> s = s.replace( /\d+/g, '' )
'abc'

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM