Sublime Forum

How to extract all .png urls from file?

#1

ie i have a bunch of HTML, and i just want to extract all the urls for the images… how can i do that with sublime?

Thanks

0 Likes

#2

You want to remove them or you want to simply find them? Or do you want to find them and put them in something like a text file or something like that?

0 Likes

#3

Sublime is an editor, so you could use it to craft up a Python or Ruby script using the Requests or Nokogiri.

0 Likes

#4
  1. select “.png”
  2. ALT+F3 (select all .png)
  3. CTRL+SHIFT+SPACE (expand selections to scope)
  4. CTRL+C, CTRL+N, CTRL+V
    ??
0 Likes

#5

[quote=“tito”]1. select “.png”
2. ALT+F3 (select all .png)
3. CTRL+SHIFT+SPACE (expand selections to scope)
4. CTRL+C, CTRL+N, CTRL+V
??[/quote]

If your scope is a string, then it includes the " either side, bit annoying.

0 Likes

#6
Select any `"`
Alt+F3
Del
0 Likes