- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: regexp and HTML
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2004 06:40 AM
02-06-2004 06:40 AM
For example,
$str1 = "some links to this subject";
$str2 = "some links to this subject";
the desired module would consider $str1 and $str2 to be equivalent.
if module not available, any code examples to accomplish this?
TIA,
Anna
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2004 06:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2004 10:21 AM
02-06-2004 10:21 AM
Re: regexp and HTML
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2004 09:36 PM
02-06-2004 09:36 PM
Re: regexp and HTML
I've never used it myself. I'm alway using the brute way: 'lynx -dump', but that won't help in your case.
But you were explicitely asking for a module, and I understand the needs.
The problem in writing it yourself with regular expressions, is that
Please mail Janneman for questions
will be rendered ok by many browsers, but is hard to parse. Worse is that
Please mail Janneman for questions
would make it even harder (though I don't know if that's legal, but both lines parse correct in Opera and both work (I just tested)
The best answer is probably in perl itself:
# perldoc -q 'How do I remove HTML from a string'
Will give you a pretty complete answer
The example for HTML::Parser is also in the FAQ (perlfaq9), here's a (stripped to your needs) code snippet from there:
use HTML::Parser;
use HTML::FormatText;
$ascii = HTML::FormatText->new->format (parse_html ($str2));
$str1 eq $ascii and return "is equal";
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2004 04:20 AM
02-09-2004 04:20 AM
Re: regexp and HTML
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2004 04:26 AM
02-09-2004 04:26 AM
Re: regexp and HTML
Thank you. These are the (technical) points I like to earn!
Enjoy, Have FUN! H.Merijn