Need Help Finding with Regexp
I'm using the code below to find strings using wildcards. Can anyone point help me figure out how to modify this to search for strings using wildcards? Been knocking myself out on this for more than a week. Can't find anything that seems to work.
function higherror (searchVar){//this finds and highlights common errors, wildcards on
var doc=app.ActiveDoc //sets the active document as the object
var docStart = doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf ; //moves insertion point to start of document
var tloc = new TextLoc (docStart, 0);
var findParams = new PropVals(); // setup find parameters
var searchString = searchVar;
findParams = AllocatePropVals(3);
findParams[0].propIdent.num = Constants.FS_FindCustomizationFlags;
findParams[0].propVal.valType = Constants.FT_Integer;
findParams[0].propVal.ival = 1 | 4;
findParams[1].propIdent.num = Constants.FS_FindText;
findParams[1].propVal.valType = Constants.FT_String;
findParams[1].propVal.sval = searchString;
findParams[2].propIdent.num = Constants.FS_FindWrap;
findParams[2].propVal.valType = Constants.FT_Integer;
findParams[2].propVal.ival = false;
var foundText = doc.Find(tloc, findParams);
