RTL history fix, checking regex before trimming message