From 15a570ea45e8caedbd410cfe4603f8c1978e88cc Mon Sep 17 00:00:00 2001 From: Wilfried OLLIVIER Date: Fri, 3 May 2019 18:35:27 +0200 Subject: [PATCH] Add regex --- src/SUMMARY.md | 1 + src/dev/regex/main.md | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 src/dev/regex/main.md diff --git a/src/SUMMARY.md b/src/SUMMARY.md index ffa868d..9921424 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -10,6 +10,7 @@ - [babel and babel-preset-stage-2](./dev/web/front/babel-preset-stage-2.md) - [js](./dev/web/javascript/main.md) - [ES6 features](./dev/web/javascript/es6.md) + - [Regex](./dev/regex/main.md) - [Tools](./dev/tools/main.md) - [Git](./dev/tools/git.md) - [SVN](./dev/tools/svn.md) diff --git a/src/dev/regex/main.md b/src/dev/regex/main.md new file mode 100644 index 0000000..26c1fc6 --- /dev/null +++ b/src/dev/regex/main.md @@ -0,0 +1,13 @@ +# Regex + +## Non capturing group + +- 8 cats +- 9 dogs +- 10 cows + +Match and capture **ONLY** the number of cats and dogs using ?:, for _non capturing_ groups + +```txt +(\d+) (?:cats|dogs) +``` \ No newline at end of file