R
R
reinmaker902021-07-31 16:21:15
JavaScript
reinmaker90, 2021-07-31 16:21:15

How to write a regular expression for Google Optimize?

To work with Google Optimize, it was necessary to create a regular expression. The task is this - tracking goods on the site, the url format for the goods is as follows:

https://www.website.com/catalog/trinkets/item-news-standart-formy/1772/

or

https://www.website.com/catalog/trinkets/item/1772/

or

https://www.website.com/catalog/1772/

, where the numbers are the product IDs that I want to find.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2021-08-02
@reinmaker1990

So ?
https://regex101.com/r/FtmqTi/1
or
https://regex101.com/r/NdYb5c/1
well, or like that,
quite briefly ,
but this is based specifically on current examples
https://regex101.com/r/ Vqe7g1/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question