I would like to find fileName with extension in the text using regular expression(s). I have text like this:
<p>Some text<a href="/relativePath1/file.ext">link</a>.<p>SomeText<img
src="/relativePath2/file2.ext" style="width: 200.2px; height: 1141px;"></p>
I know that two relative paths, and I want to extract file names, that are situated in this relative path directory. I don't want files from another relative or absolute paths. There can be more occurences of these paths. Extensions may vary.
I have tried this [\w-]+\.\w+, but it collides with style - width property, and it finds also file names from another relative paths in the text. Thanks for you help, in advance.
Additional clarification: I want to find file names that lies in that two relative paths. I know paths, but I dont know which files are there. There can be multiple occurences.