RegexSR - Quick Start


RegexSR is a very easy-to-use and powerful tool (written in Java) to create and test complex regular expressions. The plugin system provides extra functionalities, such as transforming expressions into Java code, and allows the user to create his own extensions.

Features include testing regular expressions, handling text through regular expressions or plugins, renaming files, developing plugins, and managing expressions in the repository.

An excellent website to learn regular expressions can be found at http://www.regular-expression.info/ or, in French (for Java developers), at http://cyberzoide.developpez.com/java/regex/

Tips for the Text and Filenames tabs

Tips for the Text tab only

Tips for the Filenames tab only

Testing

Use the following expressions to test the program: More examples can be found at http://www.regular-expression.info/examples.html

Repository

The repository writes its content in XML files, /system/repositoryText.xml and /system/repositoryFilenames.xml. These files can be directly edited in any text editor, for instance to make backups or to import expressions from someone else.

Plugins

If you have knowledge about Java programming, writing you own plugin for RegexSR is a very easy task. Let us start with an example that we call MyFirstPlugin. Create a class called MyFirstPlugin.java that extends PluginText and that redefines its execute method. The file has to be saved in the /plugins/text/myfirstplugin directory.

      package plugins.text.myfirstplugin;
      
      import kernel.*;
      import javax.swing.*;
      
      public class MyFirstPlugin extends PluginText {
        
        public MyFirstPlugin() {
          setSummary("The summary");
          setDescription("The description.");
        }
        
        public void execute() {
          JOptionPane.showMessageDialog(this, "My First Plugin!", "About...", 
                                            JOptionPane.INFORMATION_MESSAGE);
        }
      }
    
Define your classpath during compilation in order to access the PluginText and Tools classes: javac -cp .;../../../dev MyFirstPlugin.java

That's it! RegexSR will automatically find your plugin during runtime and allow you to test it.

Documentation about the PluginText and Tools classes is available in the /dev/javadoc directory. It is also recommended to study the following plugins (in the given order): HelloWorld, Paragraph, Sort, Accents, and HelloWorldInt.

Contact

Bug reports, suggestions, and plugins you have developped are welcomed at regexsr@fastmail.fm. Thank you very much in advance for your contribution!