Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试删除字符串之前的所有内容
234234$12$34
在第一次找到之前,所有东西都被删除了$?然后拆分$12$34到喜欢$12,$34?
$
$12$34
$12,$34
我怎么能在正则表达式中做到这一点?
谢谢
parts = "234234$12$34".match(/\$[^$]+/g)
返回
["$12", "$34"]