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

build regex that matches "xyz" in "abcmnbcxyz" (details inside)

  •  08-12-2009, 4:34 AM

    build regex that matches "xyz" in "abcmnbcxyz" (details inside)

    Hi! I need a regexp that does the following:

    For example we're having a string "abcmnbcxyz" 

     I need to build a regexp that will find everythig that goes before "z" but not containing "bc"

    I was trying to use lookups like that one: "(?<!bc).*?z" but it matches whole string. positive lookbehind ("(?<=bc).*?z") matches "mnbcxyz"

    And I need regexp to match "xyz".

    Any suggestions? 

    Filed under: ,
View Complete Thread