D
D
DTX2016-09-23 17:04:46
PHP
DTX, 2016-09-23 17:04:46

How to replace using regular expressions in sublime text 3?

The file contains lines like:

font-family: Arial Bold;
font-family: Arial Regular;
font-family: Arial Light;

We need to replace the whole thing with
font-family: Arial ***, sans-serif;
Any connoisseurs?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
NoMoney, 2016-09-23
@DirecTwiX

=> Enable regex
=> Find What: Arial (\w+);
=> Replace With: Arial $1, sans-serif;
=> ReplaceAll

P
Pavel, 2016-09-23
@mrusklon

I do it with gulp csscomb

I
iBird Rose, 2016-09-23
@iiiBird

if you need it once, then use notepad ++ better there is a mass replacement.
write what to look for: "Arial Bold", write what to replace with: "font-family: Arial Bold, sans-serif;"
and so on for all three

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question