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 » lookahead
  • Re: help Please !!

    mycotics, may I kindly point out to you post number 29450 in the thread I mentioned? if (preg_match('/^(?=.*bill)(?=.*bob)/', $string)) {     echo "Oh, look! Bill and Bob are finally here! Let's have a party!"; } will do what you want. 
    Posted to Construction Advice (Forum) by eSquire on May 8, 2007
  • 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
  • Look ahead and Look behind

    I've been trying to match the pattern below for about a week and can't seem to get it right. I need to match a specific string that is not hyper-linked or enclosed in brackets.I'm sure the code below won't match what i need. It's simply to illustrate what i'm aiming to accomplish: [^\{] word here[^\} ]  Any ...
    Posted to Construction Advice (Forum) by emarket78 on March 31, 2007