C
C
CrewCut2015-09-26 13:50:36
Regular Expressions
CrewCut, 2015-09-26 13:50:36

What should be the regular expression to get such a part?

There is a line like:

../../../../images/catalog/ХХ/ХХ/3929_3930_20130307095924.jpg

Instead of XX, there can be any numbers (maybe not two). How to get only the end name of a file using regular expressions?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Martyanov, 2015-09-26
@CrewCut

Regexps are not needed. It is enough to split the string on the separator "/" and take the last element from the resulting list.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question