Answer the question
In order to leave comments, you need to log in
How to select from a string only the path to the pdf file?
Good afternoon.
It is necessary that links with pdf files are searched and only the path is selected from the link.
That is, in the line href="/NanoBridgeM2/NanoBridgeM2.pdf". Find and replace /NanoBridgeM2/. We tried this: href="(.+\/)(.+\.pdf) - but in this case, the entire line is found. Please help me solve the problem.
Answer the question
In order to leave comments, you need to log in
and if so (\/[^\/]*\/)(.*pdf)$
and so with any nesting, you can get the name pdf (?:\/[^\/]*)*(\/.*pdf) $
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question