javascript 用 regex 取出所要字串
字串 abcd[0102] 想取出 0102
- 方法一:用 substr var rc = "abcd[0102]".substr(5,4);
- 方法二:用 regex var arr_rc = /^.*\[(\d+)\].*/.exec("abcd[0102]"); //取出符合我字串,第一個本身,第二個(),陣列從 0 開始
var rc = arr_rc[1];
方法二利用 partten 取出 [] 內的數字,不管前面有幾位都可以
迴響
javascript 用 regex 取出所要字串 | 豬窩
reverse image lookup phone look up reverse phone number lookup free check phone number spokeo
free cell phone directory at&t white pages
javascript 用 regex 取出所要字串 | 豬窩
people search free information white pages online
residential white pages lookup 411.com free reverse lookup
look up area code look up
豬窩
Hi my friend! I wish to say that this post is amazing, nice written and come
with almost all important infos. I'd like to look extra posts like this .
javascript 用 regex 取出所要字串 | 豬窩
Every weekend i used to pay a quick visit this
web page, because i wish for enjoyment, since this this site conations actually fastidious funny material
too.
javascript 用 regex 取出所要字串 | 豬窩
Hi to every single one, it's genuinely a good for me to pay a visit this website, it includes precious Information.