Showing posts with label regex. Show all posts
Showing posts with label regex. Show all posts


This episode begins to emphasize some basic regex and POSIX character classes examples. We give a simple table of POSIX character classes here so you will practice them easier for this episode. Both of them will make every GNU sed job much more easier. This is the sixth episode, so if you don't want to miss anything, we recommend you to read the first until the fifth episodes. Happy practicing!

Gedit by default doesn't contain regular expression search. To get this feature, you should install a plugin. We will use Regular Expression plugin from Ben Fisher.

1. Download Plugin

 

You can download the plugin at regex_replace-gedit3.tar.gz.


2. Install Plugin

 

  1. Copy the downloaded plugin file into ~/.local/share/gedit/plugins/ directory.
  2. Extract it.


3. Enable Plugin

 

Open Gedit > menu Edit > Preferences > tab Plugins > check on Regex Search and Replace.

This article is intended as a simple introduction to regular expression. I will show it in search & replace feature of a text editor. I will use Kate here, but it is applicable to another text editors available such as Gedit. I will show you some short examples to make it easy. It is not the best, but I hope it gives you global overview of regex in Linux text editors.