Reputation: 736
What an equivalent to JS regex /[^0-9\.]/g
could I use in Sublime Text search and replace?
upd:
I want to replace array(9.49),
with 9.49,
.
I found a solution:
find: array\((\d.+)\)(,)
and replace: \1\2
Anyway, I want to know how to use ranges in Sublime to use an equivalent to JS regex /[^0-9\.]/g
instead of \d.+
.
Upvotes: 0
Views: 1315
Reputation: 336108
You need to remove the delimiters (slashes); the global modifier g
is implicit anyway, and the backslash is unnecessary in either case:
[^0-9.]
should do.
EDIT:
Your edited question now appears to be looking for something completely different:
You want to search for
array\(([\d.]+)\), // or array\(([0-9.]+)\),
and replace with
\1,
Upvotes: 2