Closed edgar-505 closed 5 months ago
VS Code regex replace allows working with groups also. Here's an example:
Search pattern
/(19):(\d\d)
Replace
hour: $1, min: $2
Result
hour: 19, min: 22
hour: 19, min: 23
hour: 19, min: 24
hour: 19, min: 25
hour: 19, min: 26
hi I'm trying to replace an array of numbers:
19:22 19:23 19:24 19:25 19:26
then I searched them using the regex : 19:(22|23|24|25|26) but I can't add anything around the numbers with regex , I've been trying to put all of them inside a square bracket like : [19:26] using [$&] please also allow to replace with regex.
figma has have a pretty good example for renaming things with regex.