Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
Regex html
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Robert Dober, post: 4559923"] First a general remark! you should use multiline mode as tags can be more lines. Now I do not really see what you want from your page. If you want the body tag only, the following should do @response.gsub(/\s+/," ").scan(/<body[^>]*>/) this might be slow for long pages Regexen are probably not your best choice if you want to analyze the tag. Still something like this might work fine @response.gsub(/\s+/," ").scan(/<body(\s+(\w+)="([^"]*)")>/) save for escaped " HTH Robert [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
Regex html
Top