Questions tagged [regex-look-ahead]

32 questions
-4
votes
1 answer

Regexp: negative lookahead that don't allow an open tag inside a tag

I'm looking for a negative lookahead that don't allow an open tag inside a tag, I try failing negative lookahead #1 /(<(\w+)[^>]*>)((?!<\2).*?)(<\/\2>)/gs see the example failing negative lookahead #2 /(<(\w+)[^>]*>)((?!<\2).*)(<\/\2>)/gs see the…
Ivan Buttinoni
  • 4,110
  • 1
  • 24
  • 44
-4
votes
1 answer

Regular Expression to exclude a String around the required String

In between a HTML code: ...... How do I write Regular Expression (for Rainmeter which uses Perl RegEx) such that: -required string "I need this String only" is grouped to be…
1 2
3