Add: support for finalization of the main thread;
Fix: a minor issue in handling "^" pattern in the regex;
Change: warning to error for assignment inside expressions;