]> git.mxchange.org Git - friendica-addons.git/commitdiff
Merge pull request #443 from rebeka-catalina/rct/d/NSFW_README_examples
authorHypolite Petovan <mrpetovan@gmail.com>
Wed, 8 Nov 2017 16:45:25 +0000 (11:45 -0500)
committerGitHub <noreply@github.com>
Wed, 8 Nov 2017 16:45:25 +0000 (11:45 -0500)
Grouping parentheses instead of capturing parentheses

nsfw/README

index e42c2128c7e05e0770663746a2035be8113a2236..624fb7031032634cc6d50e9b894cd095c1fab6f7 100755 (executable)
@@ -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
+parentheses instead of capturing parentheses!!
+
+Grouping parentheses are:
+
+       (?: )
+
+If you use capturing parentheses, which are
+
+       ( )
+
+it will produce errors and the regex won't work and
+at least your targets will not get collapsed.
+
 
 
 3)