Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Browse by Tags

All Tags » php » conditional subpattern
  • Re: graping meta contents like a search bot

    Sorry for committing thread necromancy, but I had some time on my hands and this post had no answer . My idea of a regex for this problem looks like this: (?is)<meta\s[^>]*\bcontent\s*=\s*(['"])?((?(1)(?!\1).*?|[^\s>]*))(?(1)\1) In PHP you would do something like: $pattern = ...
    Posted to Construction Advice (Forum) by eSquire on April 24, 2007