I want to match any character (case insensitive) except when preceded by a single quote followed by the text On Error Goto:

Match:

```
on error goto err_handler
if aap = 0 then on error goto Myerrorhandler
    on error goto errorhandler1
   on error goto errorhandler2

```

Do not match:

```
' on error goto errorhandler3
'   if aap =0 then on error goto errorhandler4
Any line not containing On Error Goto

```

I tried: `[^']*(On Error Goto)` but that didn't work.

It is to test if an Errorhandler is used in procedures

Thanks!