# Search on text

**URL:** <https://www.ruby-forum.com/t/search-on-text/192882>\
**Category:** Ruby\
**Created:** [August 7, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/search-on-text/192882 "2010-08-07T16:22:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![learningruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/6bbea6/32.png) [@learningruby](https://www.ruby-forum.com/u/learningruby)\
**Post date:** [August 7, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/search-on-text/192882/1 "2010-08-07T16:22:23Z")

</div>

I have a text

........ site.imageList = { images: [['http://site/1.jpg', 'http://site/2.jpg', 'http://site/3.jpg']] }; ..............

I get this text through

Nokogiri::HTML(open(@url))

Full text of this full page of the website is only part of which I need  
to get just that I need the values

how I can get an array links ?

# =\> [[http://site/1.jpg](http://site/1.jpg)’, ‘[http://site/2.jpg](http://site/2.jpg)’, '[http://site/3.jpg](http://site/3.jpg)]

---

<div class="post-metadata">

**Author:** ![learningruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/6bbea6/32.png) [@learningruby](https://www.ruby-forum.com/u/learningruby)\
**Post date:** [August 7, 2010, 4:29pm UTC](https://www.ruby-forum.com/t/search-on-text/192882/2 "2010-08-07T16:29:30Z")

</div>

On Sat, Aug 7, 2010 at 9:22 AM, Unc88 Unc88 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I get this text through

Are you saying the page you are parsing returns code (like a pastebin or  
a  
gist) and you wish to parse the code?

---

<div class="post-metadata">

**Author:** ![learningruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/6bbea6/32.png) [@learningruby](https://www.ruby-forum.com/u/learningruby)\
**Post date:** [August 7, 2010, 4:38pm UTC](https://www.ruby-forum.com/t/search-on-text/192882/3 "2010-08-07T16:38:38Z")

</div>

Josh C. wrote:

> On Sat, Aug 7, 2010 at 9:22 AM, Unc88 Unc88 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I get this text through
> 
> Are you saying the page you are parsing returns code (like a pastebin or  
> a  
> gist) and you wish to parse the code?

This java script code, which includes links to those pictures that I  
want to download from their site.

---

<div class="post-metadata">

**Author:** ![learningruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/6bbea6/32.png) [@learningruby](https://www.ruby-forum.com/u/learningruby)\
**Post date:** [August 7, 2010, 4:41pm UTC](https://www.ruby-forum.com/t/search-on-text/192882/4 "2010-08-07T16:41:43Z")

</div>

I need only draw from this piece of code references
