The below SQL's should give different answers as regexp rules state that * is a special character which needs to be escaped with \ to be considered as a literal string. This second should literally match for A*B and return 2 but it is also taking AB as a match and returning 3
SELECT regexp_count('nA*BsABreA*Bthe', 'A*B') str_cnt;
SELECT regexp_count('nA*BsABreA*Bthe', 'A\*B') str_cnt;