Few perl regexes for reference and worth noting. How do i remove consecutive pair of characters? ``` laptop:~/Perl2$ cat test.txt this is a test file ffor cchecking ddouble cchars. laptop:~/Perl2$ cat test.txt|perl -pane 's/(.)\g1/$1/g' this is a test file for checking double chars. ``` Here , the (.) is used to capture the character and the \g1 is used to find if the stored value is the same as the one immediately following it. And then we replace that with $1 How do i find matching/nesting anything? To find something between two single characters, a pattern like /x([^x]*)x/ will get the intervening bits in $1. For multiple ones, then something more like /alpha(.*?)omega/ would be needed.