Sublime Text Editor for Text Editing

sublimeregexUsing Regular Expressions To Format Text in Sublime Text.

I use Sublime Text to clean up text all of the time.  It is absolutely the fastest and easiest way to make neat lists or to grab a bunch of text and convert it to arrays or whatever.

Why is it so awesome? Because it is a text editor on steroids.

How is it so awesome? Because it has regular expressions built in to its text searching. YAY!

It is even faster for searching in code especially if you are utilizing id, name, label, or class tags.

Some Quick Searches

Look ahead

(?<=SELECT EVERYTHING AFTER THIS).+

Look Behind

(?=SELECT EVERYTHING BEHIND THIS).+

Look Between

(?<=SELECT EVERYTHING).+(?=BETWEEN THIS)

Select All text Between paragraph tags

(?<=<p>).+(?=</p>)

Cleaning up things

Select Empty Lines

^\n

Selecting all Opening Links

<a.+?>

Select all Closing Anchor Tags

</a>

I’ll add to this list as I think of helpful regular expressions

You may also like...