Pew Pew Laser Blog

Code. Glass art. Games. Baking. Cats. From Seattle, Washington and various sundry satellite locations.

Pew Pew Laser Blog Archives — by Blog ID

Handy Regexes for Search and Replace.

3.26.2018

Sublime Text - my favorite editor - will let you use a regular expression (regex) in its search and replace functionality. Here are some handy regexes that I've used in the past:

Any anchors
href=\"[^\s]*\"
Any dollar value
\$[0-9.,]+
All HTML comments and their contents
<!--(.|\s)*?-->
Either "alpha" or "beta"
(alpha|beta)
Any blank lines
^\n
Any pair of "s not preceeded by ="
[^=]""
Sass mixins
@mixin .* \{
Sass extends
\%[^\s]*

Permalink

Tags: tooling

Authorized users may log-in to leave a comment.

Last Blog: Inkscape - Using Path > Difference With Text.

Next Blog: LinkedIn for Job Seekers.