I have a string that contains sequences delimited by multiple characters: << and >>. I need a regular expression to only give me the
<<
>>
@matches = $string =~ /(<<(?:(?!<<|>>).)*>>)/g;
(?:(?!PAT).)* is to patterns as [^CHAR]* is to characters.
(?:(?!PAT).)*
[^CHAR]*