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

Find first previous string NOT all previous occurances

  •  06-09-2007, 4:34 PM

    Find first previous string NOT all previous occurances

    In the following string:

    <div class="x" bla bla bla <div class="x" bla bla bla <div class="x" bla bla bla EXAMPLE STRING

     I want to match: <div class="x" bla bla bla EXAMPLE STRING

    NOT
    <div class="x" bla bla bla <div class="x" bla bla bla <div class="x" bla bla bla EXAMPLE STRING

    I have experimented with RegexBuddy. Here is what I tried (no joy):

    (<div class="x")+.*?EXAMPLE STRING

     

View Complete Thread