D
D
dev4002016-04-21 22:30:26
PHP
dev400, 2016-04-21 22:30:26

Why doesn't any regex constructor understand this?

~^/forum(/[a-z0-9_/\-]+/)([0-9]+)\.xhtml$~
Line: /forum/web-development/php/12345.xhtml

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2016-04-21
@dev400

because constructors usually use the format /regex/, and your regular expression crashes because of unescaped slashes.
^\/forum(\/[\d\w_\/\-]+\/)([\d]+)\.xhtml

F
frontender, 2015-04-20
@frontender

by hand and with the help of these pseudo-classes:

:last-child
:nth-child(n)

google

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question