Searching a word

Hai
I want to search a word in the xml file using ruby
I dont know , how to do that.

Example:
new
hussain.jpg

From this example ,i want to get the hussain.jpg
can any body tell me
Ok

From this example ,i want to get the hussain.jpg
can any body tell me
Ok


Posted via http://www.ruby-forum.com/.

Try this.

str = “new\nhussain.jpg”
str =~ /(.*?)</image>/
p $1

Harry

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs