From 4b4775812b8486636ce285062c80333ea9589b9c Mon Sep 17 00:00:00 2001 From: rebeka-catalina Date: Wed, 8 Nov 2017 16:14:35 +0100 Subject: [PATCH 1/3] Grouping parantheses instead of capturing parantheses --- nsfw/README | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/nsfw/README b/nsfw/README index e42c2128..89dbec01 100755 --- a/nsfw/README +++ b/nsfw/README @@ -47,7 +47,25 @@ done with a single regex, which matches all of them: Another use case could be, that you are simply not interested in postings about christmas. - /christmas([-_ ]?(tree|time|eve|pudding))?/ + /christmas([-_ ]?(?:tree|time|eve|pudding))?/ + + +ATTENTION: + +It is absolutely important, that you use grouping +parantheses instead of capturing parantheses!! + +Grouping parantheses are: + + (?: ) + +If you use capturing parantheses, which are + + ( ) + +it will produce errors and the regex won't work and +at least your targets will not get collapsed. + 3) From fe8d61cc41d01926a5ed66f5d93b3f21ec6ac26b Mon Sep 17 00:00:00 2001 From: rebeka-catalina Date: Wed, 8 Nov 2017 17:19:51 +0100 Subject: [PATCH 2/3] Fixed a missing position --- nsfw/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nsfw/README b/nsfw/README index 89dbec01..bb21bda6 100755 --- a/nsfw/README +++ b/nsfw/README @@ -47,7 +47,7 @@ done with a single regex, which matches all of them: Another use case could be, that you are simply not interested in postings about christmas. - /christmas([-_ ]?(?:tree|time|eve|pudding))?/ + /christmas(?:[-_ ]?(?:tree|time|eve|pudding))?/ ATTENTION: From 423db8e766ad019cb7b157df4976dd27822b5cda Mon Sep 17 00:00:00 2001 From: rebeka-catalina Date: Wed, 8 Nov 2017 17:44:20 +0100 Subject: [PATCH 3/3] Fixed the typos --- nsfw/README | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nsfw/README b/nsfw/README index bb21bda6..624fb703 100755 --- a/nsfw/README +++ b/nsfw/README @@ -53,13 +53,13 @@ interested in postings about christmas. ATTENTION: It is absolutely important, that you use grouping -parantheses instead of capturing parantheses!! +parentheses instead of capturing parentheses!! -Grouping parantheses are: +Grouping parentheses are: (?: ) -If you use capturing parantheses, which are +If you use capturing parentheses, which are ( )