in reply to How to tell if the content of one tag is completely contained within another?
Its not very clear what you are asking. If you want to know how to tell if the bold tags cover the fully content of the title tag maybe:
sub is_all_in_bold { my $title=shift; my ($title_content)=$title=~m!<title>(.*?)</title>!s; $title_content=~s!<b>.*?</b>!!sg; return !$title_content; } while (<DATA>) { print; chomp; print is_all_in_bold($_) ? "Its all in bold\n" : "Its not all in b +old\n"; } __END__ <title><b>Meta‐Ethics and The Problem of Creeping Minimalism</b +></title> <title>Meta‐Ethics and <b>The Problem of Creeping</b> <b>Minima +lism</b></title>
But i could have totally misunderstood the question.
First they ignore you, then they laugh at you, then they fight you, then you win.
-- Gandhi
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: matching
by Anonymous Monk on Oct 07, 2004 at 09:51 UTC | |
by demerphq (Chancellor) on Oct 07, 2004 at 11:49 UTC |