Utilizzo di RexEg per il riconoscimento dei modelli di URL
Il motore di pattern matching di CrowdHandler utilizza la sintassi delle espressioni regolari POSIX-Extended.
https://en.wikibooks.org/wiki/Regular_Expressions/POSIX_Basic_Regular_Expressions
https://www.regular-expressions.info/posix.html
Ad esempio:
.od corrisponde a qualsiasi stringa di tre caratteri che termina con "od", compreso "hod", "mod", e "annuire".
[hm]od corrisponde a "hod" e "mod".
[^m]od corrisponde a tutte le stringhe individuate da .od tranne "mod".
^[hm]od corrisponde a "hod" e "mod", ma solo all'inizio della stringa o della riga.
[hm]od$ corrisponde a "hod" e "mod", ma solo alla fine della stringa o della riga.
\[.\] corrisponde a qualsiasi singolo carattere racchiuso tra "[" e "]", poiché le parentesi quadre sono precedute dal carattere di escape; ad esempio: "[a]" e "[b]".
/(prodotto1|prodotto2)$
Risultati:
https://my-domain.com/product1
https://my-domain.com/product2
ma NON
https://my-domain.com/product1/
<span>https://my-domain.com/products/product1</span>
https://my-domain.com/product3
.*\/(prodotto1|prodotto2)\/$
Risultati:
https://my-domain.com/product1/
https://my-domain.com/product2/
E
<span>https://my-domain.com/products/product1/</span>
<span><span>but </span><strong><span>NOT</span></strong></span>
https://my-domain.com/product1
https://my-domain.com/product2
https://my-domain.com/product3
.*\/(prodotto1|prodotto2)\/?$
Risultati:
https://my-domain.com/product1
https://my-domain.com/product2
E
https://my-domain.com/product1
https://my-domain.com/product1/
<span>https://my-domain.com/products/product1</span>
<span>https://my-domain.com/products/product1/</span>
https://my-domain.com/product2
https://my-domain.com/product2/
https://my-domain.com/products/product2
https://my-domain.com/products/product2/
<span>https://my-domain.com/products/details/product1</span>
<span>etc</span>
<span>but </span><strong><span>NOT</span></strong>
https://my-domain.com/product3
https://my-domain.com/products/product3