Verwendung von RexEg zum Abgleichen von URL-Mustern

Die Musterabgleich-Engine von CrowdHandler verwendet die Syntax für erweiterte POSIX-reguläre Ausdrücke.

POSIX-reguläre Ausdrücke (Wikibooks)

POSIX-reguläre Ausdrücke (regular-expressions.info)

Beispiele für die Syntax regulärer Ausdrücke nach POSIX (IBM)

Zum Beispiel:

.od passt auf jede dreistellige Zeichenfolge, die mit „od“ endet, einschließlich „hod", "mod", und "nicken".

[hm]od entspricht „hod" und "mod".

[^m]od stimmt mit allen Zeichenfolgen überein, die von .od außer „mod".

^[hm]od entspricht „hod" und "mod", allerdings nur am Anfang der Zeichenkette oder Zeile.

[hm]od$ entspricht „hod" und "mod", jedoch nur am Ende der Zeichenkette oder Zeile.

\[.\] passt auf jedes einzelne Zeichen, das von „[“ und „]“ umgeben ist, da die Klammern mit einem Escape-Zeichen versehen sind, zum Beispiel: „[a]" und "[b]".

/(Produkt1|Produkt2)$

Spiele:

https://my-domain.com/product1

https://my-domain.com/product2

aber NICHT

https://my-domain.com/product1/

https://my-domain.com/products/product1

https://my-domain.com/product3

.*\/(Produkt1|Produkt2)\/$

Spiele:

https://my-domain.com/product1/

https://my-domain.com/product2/

UND

https://my-domain.com/products/product1/

but <strong>NOT</strong>

https://my-domain.com/product1

https://my-domain.com/product2

https://my-domain.com/product3

.*\/(Produkt1|Produkt2)\/?$

Spiele:

https://my-domain.com/product1

https://my-domain.com/product2

UND

https://my-domain.com/product1

https://my-domain.com/product1/

https://my-domain.com/products/product1

https://my-domain.com/products/product1/

https://my-domain.com/product2

https://my-domain.com/product2/

https://my-domain.com/products/product2

https://my-domain.com/products/product2/

https://my-domain.com/products/details/product1

usw.

but <strong>NOT</strong>

https://my-domain.com/product3

https://my-domain.com/products/product3