Change regular expression to handler anonymous and local classes