Ryan Ryan - 1 month ago 9
Sass (Sass) Question

Ensure exactly one space after each colon in CSS in Netbeans

I'm editing old SCSS in Netbeans and want to format it to be prettier.

I want to do a regex "find and replace" on all colons that are not followed by a space. I want to ensure that exactly one space follows each colon.

Here is some sample SCSS:

display: block;

The regex would ignore the first line and then for the next 3 lines would add a space after each colon.

I know there are special corner cases such as
. I could do each find-and-replace one by one rather than "replace all". I could then skip over the corner cases.

If there is a non-regex way to do this, that would work too.


Try this search


And replace it with

$1 $2