Skip to content
This repository has been archived by the owner on Nov 18, 2019. It is now read-only.

paradoxxxzero/pyregexp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pyregexp

pyregexp is a command for emacs which enables you to use Python regular expressions and either a Python string or a Python expression for doing replacements.

While constructing the regexp in the minibuffer, you get live visual feedback for the matches, including group matches:

entering regexp

While constructing the replacement in the minibuffer, you get live visual feedback for the replacements:

entering replacement

Installation

Put pyregexp.el and pyregexp.py into the same directory.

If you are using Emacs 24, you can get pyregexp from melpa with the package manager.

You need a Python interpreter. Add the following code to your init file. Of course you can select your own key.

(add-to-list 'load-path "folder-in-which-pyregexp-files-are-in/") ;; if the files are not already in the load path
(require 'pyregexp)
(define-key global-map (kbd "C-c r") 'pyregexp-replace)

To customize, use M-x customize-group [RET] pyregexp. You can specify how the Python interpreter is invoked by modifying the pyregexp-command-prefix variable. The default is python ....

Examples

Example 1

Example 1

Example 2

Example 2

Example 3

Example 3

Example 4

Example 4

About

A Python regexp/replace command for Emacs with interactive visual feedback

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published