-
-
Notifications
You must be signed in to change notification settings - Fork 74
Regular Expressions
When using a custom RegEx Gesturefy only takes its first full match, so other matches and groups are ignored.
I highly recommend using a website like https://regex101.com/ to develop and test your custom RegEx. For more information about the allowed RegEx characters in JavaScript see MDN
The default RegEx will only match nonnegative numbers between slashes (e.g. www.example.com/34/) or in query parameter values (e.g. www.example.com?para=34). If multiple matches exist it will always take the last/right match (e.g. www.example.com/120/?para1=01¶2=34)
When using a custom RegEx the match needs to be a nonnegative number otherwise the command will have no effect.
RegEx: ((?<=page=)|(?<=site=)|(?<=p=)|(?<=_pgn=))\d+
This can be read as GET <NUMBER> WHERE "page="<NUMBER> OR "site="<NUMBER> OR "p="<NUMBER> OR "_pgn="<NUMBER>
and will match the following url parts:
- www.example.com?page=04
- www.example.com?p=78
- www.example.com/45/test/?site=78&other=45