From edce759d88e34dc7f0f8474b129c999e26935b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Laurent?= Date: Mon, 22 Feb 2016 22:17:02 +0100 Subject: [PATCH 1/2] Use a link to Boost.Regex that always point to latest release --- doc/coding-style.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/coding-style.asciidoc b/doc/coding-style.asciidoc index 043b1bea..36208bce 100644 --- a/doc/coding-style.asciidoc +++ b/doc/coding-style.asciidoc @@ -7,7 +7,7 @@ Kakoune is written in C++11, here are the main coding style points: - That means avoid depending on boost, it is only allowed for the regex implementation. The reference for the current regex support is available under - http://www.boost.org/doc/libs/1_59_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html[Perl Regular Expression Syntax]. + http://www.boost.org/doc/libs/release/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html[Perl Regular Expression Syntax]. * 4 spaces for indentation, no tabs From f1b48d0b3c94aee9630ca3df7114b7d7a65ffe4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Laurent?= Date: Mon, 22 Feb 2016 22:22:05 +0100 Subject: [PATCH 2/2] Add some info about regex syntax --- README.asciidoc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.asciidoc b/README.asciidoc index 48f88cae..e470063c 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -472,6 +472,9 @@ A multiselection can also be obtained with `S`, which splits the current selection according to the regex entered. To split a comma separated list, use `S` then ', *' +The regex syntax supported by Kakoune is the Perl one and is describe +here <>. + `s` and `S` share the search pattern with `/`, and hence entering an empty pattern uses the last one. @@ -987,6 +990,18 @@ begins and/or ends at word boundaries and set the search pattern accordingly. with `alt-*` you can set the search pattern to the current seletion without Kakoune trying to be smart. +Regex syntax +~~~~~~~~~~~~ + +The regex syntax supported by Kakoune is the Perl syntax currently provided +by Boost : +http://www.boost.org/doc/libs/release/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html[Perl Regular Expression Syntax]. + +Tips +^^^^ + +* It is possible to make case insensitive regex by prefixing expression with `(?i)` + Exec and Eval ~~~~~~~~~~~~~