Notebook of Bloody Regex

Tested in search method of vim editor.

Get single letter [a-z]
Number [0-9]

Get multiple letters, (first letter and the following letters)

Get multiple letters rather they are lower or uppercase

Get single character, use the character itself or
\W matches any non-word character


Get all text inside "" like a string value in PL


Get everything inside brackets with the brackets together

{[^}]} means, start with { get all until }₁ and get the last }₂

Get all newline characters after any last-character, if the line ends with (.) or a letter, or a bracket.


Replace all multiple emply lines, like every two or three unnecessary empty line into one in the entire document.
  1. Get every EOL ending with any type of char
  2. Add an irrevelant character as a marker by replacing with
  3. Get marker characters and replace them with newline
Get all html tags with opening and enclosing together

Example: <code>some code text</code>