mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-22 02:43:41 +00:00
Grouping parantheses instead of capturing parantheses
This commit is contained in:
parent
791579f10b
commit
4b4775812b
1 changed files with 19 additions and 1 deletions
20
nsfw/README
20
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)
|
||||
|
|
Loading…
Reference in a new issue