Solved

Extract list of jpg files

Posted on 2014-01-05
1
270 Views
Last Modified: 2014-01-05
I am trying to get a list of all jpg files in a html file. The html file is complex, and not formatted clearly. (at least not to a human) I have tried to add blank lines around the image tags, but that is not helping to split up the results enough. I imagine there has to be an easy way to get a list of files?

<img src="directory/test.jpg" alt="" width="200" height="250">

becomes:
directory/test.jpg
0
Comment
Question by:stakor
1 Comment
 
LVL 84

Accepted Solution

by:
ozo earned 500 total points
ID: 39758607
perl -lne 'print for /src="(.*?)"/g'
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now