Using uvm_svcmd_dpi.svh

I understood that there is function in uvm_svcmd_dpi.svh which provides a similar facility to do regexp matching.
Is it one of the following:

function chandle uvm_dpi_regcomp(string regex);
function int uvm_dpi_regexec(chandle preg, string str);

How should I use it (for example I want to know if the string “string” contains “str”.