Solved

Extract list of jpg files

Posted on 2014-01-05
1
271 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Basic Regex for use in webservice 1 64
Parse CSS value with RegEx 2 70
Greater than or equal to 2005? 3 46
Regex HELP 2 23
by Batuhan Cetin Regular expression is a language that we use to edit a string or retrieve sub-strings that meets specific rules from a text. A regular expression can be applied to a set of string variables. There are many RegEx engines for u…
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
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…

773 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