

Regular expressions examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | To get URLs which ends on a digit and "/" char
***.ru/catalog/computers_and_notebooks/monitors/1070937/
Use the regular expression
re:[0-9]/\Z
Where
[0-9] - denotes a digit
/ - denotes "/" char
\Z - denotes end of the text
To get URLs wich contains 7 digits between slash
***.ru/catalog/computers_and_notebooks/monitors/1070937/
Use the regular expression
re:/\d{7}/\Z
Where
/ - denotes "/" char
\d - denotes a digit
{7} - means, that previous element (\d) should repeat exactly 7 times
/ - denotes "/" char
\Z - denotes end of the text
To get URLs wich contains from 7 to 10 digits between slash
***.ru/catalog/computers_and_notebooks/monitors/1070937/
***.ru/catalog/computers_and_notebooks/monitors/10709378/
***.ru/catalog/computers_and_notebooks/monitors/1070937810/
Use the regular expression
re:/\d{7,10}/\Z
Where
/ - denotes "/" char
\d - denotes a digit
{7,10} - means, that previous element (\d) should repeat from 7 to 10 times
/ - denotes "/" char
\Z - denotes end of the text |
See also:
– Regular expressions Syntax (not translated)
– Regular expressions modifiers

sbfroot@gmail.com
SBFactory_support 