N
N
noname902015-10-15 11:58:01
JavaScript
noname90, 2015-10-15 11:58:01

How to strip url parameters through regular expressions?

There are 2 types of url addresses:
les.local/page5
les.local/category/Fentezi/page33
you need to cut out the page number, in the first case 5 in the second 33.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2015-10-15
@noname90

/page(\d+)/
jsfiddle.net/htwg2gmf

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question