Harry wrote:
>> You may be lucky with <title> since it's likely to not include any
>> attributes, but still there might be some whitespace INSIDE the tags,
>>
>> Jenda
>>
> 
> str = "This is <title>     what I\n\n\n\n    \n   want     </title> and 
> no more"
> p str
> 
> str =~ /<title>(.*?)<\/title>/m
> p $1.gsub(/(\n|\s)+/, " ").strip
> 
> 
I think he meant:

str = "This is <title  >what I want</title> and no more"

but we don't know if the problem requires handling anything more complex 
than simple tags.

-- 
Alex