I am trying to do a mortality search for a specific disease (X), in a national database. what is the difference between using regex and strpos?

gen X=.

replace X=1 if regexm(Cause of dead,"X")==1

vs

replace X=1 if strpos(Cause of dead,”X”)>0