what regular expression i must use if i want to extract "-i123213131345" from URL like this http://example.com/blabla-bla-i123213131345/blabla
Asked
Active
Viewed 108 times
-3
Gordon
- 305,248
- 71
- 524
- 547
Pavel Kenarov
- 844
- 1
- 9
- 21
-
I have tried with something like '/(-i _[0-9])/' but without success – Pavel Kenarov Jun 26 '13 at 08:31
-
1Why would that work? There's no underscore in there... `/-i\d+/` – elclanrs Jun 26 '13 at 08:33
-
Neither is there any quantifier in the pattern – Gordon Jun 26 '13 at 08:34
-
Thanks a lot for this /-i\d+/. It works perfect for me – Pavel Kenarov Jun 26 '13 at 08:35