0

I am looking for a Perl style regex text editor where I can do the following:

SEARCH FOR: (\d\d\d) :.*

REPLACE WITH: \1

The above looks for three digits, a space, a colon, and anything following. It then truncates it and replaces the above with those three digits.

The program doesn't have to be fancy. The old Windows style Notepad with regex abilities would be fine if it ran on Linux Mint Cinnamon.

I had such a program for Windows by JSimlo called "TED Notepad". The TED that is available for Linux is not the same one.

2
  • I'm not sure what Perl-style regex is like, but if it's like Python's then you might like Shule, which is found here: vertex.alwaysdata.net/software.html (although it does use Tkinter, the regular expression search doesn't use Tkinter's default for that; they're actually full-on Python-style regular expressions that allow for grouping in search and replaces, functions and all). Commented Oct 17 at 1:30
  • Shule does support your example exactly as you said it, but in looking at the differences between Perl and Python's regular expressions, there are a lot of other differences. But if it's just substitutions with grouping you're after, then it should work just fine. Commented Oct 18 at 4:56

3 Answers 3

0

I use Bluefish for this, because of its fast startup time.

Bluefish can be installed on Linux Mint using the package manager.

0

I've tested your regex and it worked with Geany. I also use Linux Mint (Cinnamon) and my favorite IDE is Geany. I use it mainly as a text editor. I find it faster (especially for larger files) than xed which doesn't work with your regex.

You can use regular expressions in the Find and Replace dialogs by selecting the Use regular expressions check box (see Matching options). The syntax is Perl compatible.

Geany Manual - Regex

0

You can use Sublime Text

https://www.sublimetext.com

To go to search and replace, press Ctrl+H

Alt+R to enable support for regular expressions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.