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

matching opposite of my RegEx

Last post 11-06-2009, 12:12 AM by jackmatt2. 2 replies.
Sort Posts: Previous Next
  •  11-04-2009, 7:16 AM 57133

    matching opposite of my RegEx

    I have a regex that matches between two <def> and </def> tags.  It seems to work nicely, however, I need the opposite of this.  Everything other than data between <def> tags.  How would I do this?

    <def\b[^>]*>(.*?)</def>

     

     

  •  11-04-2009, 1:01 PM 57141 in reply to 57133

    Re: matching opposite of my RegEx

    Why not replace your current match with an empty string?

    Michael

    "In theory, theory and practice are the same. In practice, they are not."
    Albert Einstein
  •  11-06-2009, 12:12 AM 57182 in reply to 57141

    Re: matching opposite of my RegEx

    Because I want to replace the opposite of what I have matched
View as RSS news feed in XML