How do I correctly write the following URL in RegEx -
a non-dev here, need writing regex url -
https://example.co.uk/checkout/order-received/210553/?key=wc_order_57960575c7d73
- in order track in kissmetrics, far have gotten
https://example.co.uk/checkout/order-received/?([\da-z.-]+)/
but feel stuck, can lend me hand?
thanks!
the regex want https:\/\/example\.co\.uk\/checkout\/order-received\/\d+\/\?key=wc_order_[\da-z]+
.
what match first part of url literal string, order number abitrary string of digits. after that, escapes question mark (as question marks have specific meaning in regex) , matches query string, including end bit ([\da-z]
, of course, refers string composed of both letters , numbers).
Comments
Post a Comment