Hi,. I'm trying to detect any links that are contained within an html page
using eregi pattern matching. I was wondering if there are any pattern
matching geniuses out there who could write a pattern that merges all the
different manners in which a link could be wriiten,
Current patterns I can think of include:
<a href=x.com> no spaces betwen href, equals and url, no quotation marks
around url
<a href =x.com> space between href and equals, no space between equals and
url, no quotation marks round url
<a href= x.com> no space between href and equals, space between equals and
url, no quotation marks around url
<a href = x.com> space between href and equals, space between equals and
url, no quotation marks round url
<a href='x.com'> no spaces betwen href, equals and url, single quotation
marks around url
<a href ='x.com'> space between href and equals, no space between equals and
url, single quotation marks round url
<a href= 'x.com'> no space between href and equals, space between equals and
url, single quotation marks around url
<a href = 'x.com'> space between href and equals, space between equals and
url, single quotation marks round url
<a href="x.com"> no spaces betwen href, equals and url, double quotation
marks around url
<a href ="x.com"> space between href and equals, no space between equals and
url, double quotation marks round url
<a href= "x.com"> no space between href and equals, space between equals and
url, double quotation marks around url
<a href = "x.com"> space between href and equals, space between equals and
url, double quotation marks round url
<a href='x.com"> no spaces betwen href, equals and url, mismatched quotation
marks around url - single open, double to close
<a href ='x.com"> space between href and equals, no space between equals and
url, mismatched quotation marks around url - single open, double to close
<a href= 'x.com"> no space between href and equals, space between equals and
url,mismatched quotation marks around url - single open, double to close
<a href = 'x.com"> space between href and equals, space between equals and
url, mismatched quotation marks around url - single open, double to close
<a href="x.com'> no spaces betwen href, equals and url, mismatched quotation
marks around url - double open, single to close
<a href ="x.com'> space between href and equals, no space between equals and
url, mismatched quotation marks around url - double open, single to close
<a href= "x.com'> no space between href and equals, space between equals and
url,mismatched quotation marks around url - double open, single to close
<a href = "x.com'> space between href and equals, space between equals and
url,mismatched quotation marks around url - double open, single to close
I guess whats needed is something more advanced than
eregi("href=\"/(.*)\">",string ,$arryaholding_ results))
I'd appreciate any help you could give,
Thanks
NimP
using eregi pattern matching. I was wondering if there are any pattern
matching geniuses out there who could write a pattern that merges all the
different manners in which a link could be wriiten,
Current patterns I can think of include:
<a href=x.com> no spaces betwen href, equals and url, no quotation marks
around url
<a href =x.com> space between href and equals, no space between equals and
url, no quotation marks round url
<a href= x.com> no space between href and equals, space between equals and
url, no quotation marks around url
<a href = x.com> space between href and equals, space between equals and
url, no quotation marks round url
<a href='x.com'> no spaces betwen href, equals and url, single quotation
marks around url
<a href ='x.com'> space between href and equals, no space between equals and
url, single quotation marks round url
<a href= 'x.com'> no space between href and equals, space between equals and
url, single quotation marks around url
<a href = 'x.com'> space between href and equals, space between equals and
url, single quotation marks round url
<a href="x.com"> no spaces betwen href, equals and url, double quotation
marks around url
<a href ="x.com"> space between href and equals, no space between equals and
url, double quotation marks round url
<a href= "x.com"> no space between href and equals, space between equals and
url, double quotation marks around url
<a href = "x.com"> space between href and equals, space between equals and
url, double quotation marks round url
<a href='x.com"> no spaces betwen href, equals and url, mismatched quotation
marks around url - single open, double to close
<a href ='x.com"> space between href and equals, no space between equals and
url, mismatched quotation marks around url - single open, double to close
<a href= 'x.com"> no space between href and equals, space between equals and
url,mismatched quotation marks around url - single open, double to close
<a href = 'x.com"> space between href and equals, space between equals and
url, mismatched quotation marks around url - single open, double to close
<a href="x.com'> no spaces betwen href, equals and url, mismatched quotation
marks around url - double open, single to close
<a href ="x.com'> space between href and equals, no space between equals and
url, mismatched quotation marks around url - double open, single to close
<a href= "x.com'> no space between href and equals, space between equals and
url,mismatched quotation marks around url - double open, single to close
<a href = "x.com'> space between href and equals, space between equals and
url,mismatched quotation marks around url - double open, single to close
I guess whats needed is something more advanced than
eregi("href=\"/(.*)\">",string ,$arryaholding_ results))
I'd appreciate any help you could give,
Thanks
NimP
Comment