pcre2el
pcre2el copied to clipboard
convert between PCRE, Emacs and rx regexp syntax
pcre-mode is awesome. But, it broken my isearch function in some case. I often to search a string with C-s, and then press a hotkey `(isearch-yank-word) to select word after...
Function `preceding-sexp` is obsolete from Emacs 25.1
I can't manage to convert that: ``` (defvar klassified--search-class-definition (concat ;; optional variable declaration (overrides 2) "\\(?:\\(?:return \\)\\|\\(?:let \\(?2:[^ ]+?\\) = \\)\\)" ;; superclass reference (4) "\\(?4:.*\\)" "\\." (regexp-opt '("subclass"...
The previous release is from 2015. What about tagging the current commit?
```emacs-lisp ELISP> (rxt-elisp-to-rx "[_a-z]") (any 95 (97 . 122)) ``` I think this should convert characters to strings (so `"_"` rather than 95, which is `?_`), and ranges could be...
I found `(js|coffee)` will be translate to `"\\(\\(?:coffee\\|js\\)\\)"` But, i think this is equivalent to `"\\(coffee\\|js\\)"`?
Hi, Trying to convert this PCRE: https://regex101.com/r/qL1cX4/1 `(rxt-pcre-to-elisp "^\\section")` gives ``` "^[ ^l^M ]ection" ``` Same things with `(rxt-pcre-to-rx "^\\section")` ``` (seq bol (any 9 10 12 13 32) "ection")...
I just discovered `pcre-mode` and it's awesome! It doesn't work for all methods (e.g `ibuffer-do-replace-regexp` which tries to be too smart), but it makes emacs much easier to use for...
GNU ELPA now has a neat-looking `lex` library for generating lexers, written by Stefan Monnier, which includes a function `lex-parse-re` for parsing Emacs and basic regex syntax into `rx` form...
When try to convert this common regex: `(rxt-pcre-to-elisp "^(?:ISBN(?:-1[03])?:? )?(?=[0-9X]{10}$|(?=(?:[0-9]+[- ]){3})[- 0-9X]{13}$|97[89][0-9]{10}$|(?=(?:[0-9]+[- ]){4})[- 0-9]{17}$)(?:97[89][- ]?)?[0-9]{1,5}[- ]?[0-9]+[- ]?[0-9]+[- ]?[0-9X]$") ` The debugger reports: ``` Debugger entered--Lisp error: (rxt-invalid-regexp "Unrecognized PCRE extended...