notepad

notepad++ how to use regex to find lines that have two capital letters in a row?


how to use regular expression to find strings containing two capital letters in a row?

   ^([A-Z\s]+)$ 

Solution

  • ^.*[A-Z]{2}.*$ matches as follows

    ^        Beginning of the line
    .*       Any char for any number of times
    [A-Z]{2} Two consecutive capital letters 
    .*       Any char for any number of times
    $        End of line
    

    Find a live example here: https://regex101.com/r/m2hPbh/1