Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Searching a word
Mohamed Hussain
7/6/2007 9:11:00 AM
Hai
I want to search a word in the xml file using ruby
I dont know , how to do that.
Example:
<name>new</name>
<image>hussain.jpg</image>
From this example ,i want to get the hussain.jpg
can any body tell me
Ok
--
Posted via
http://www.ruby-...
.
1 Answer
Harry Kakueki
7/6/2007 9:32:00 AM
0
> From this example ,i want to get the hussain.jpg
> can any body tell me
> Ok
>
> --
> Posted via
http://www.ruby-...
.
>
>
Try this.
str = "<name>new</name>\n<image>hussain.jpg</image>"
str =~ /<image>(.*?)<\/image>/
p $1
Harry
--
A Look into Japanese Ruby List in English
http://www.ka...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Searching a word
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password