Need help with "consider case" for regexp searches
With assistance of forum's Frame Master I've be able to implement the code below to search for regexps. However, I can't seem to set the Consider Case parameter. I remember an earlier piece of code posted by K. Daube that used qFlags, but I'm not familiar with how they work. Rick mentioned adding an "ig" or "g" to set the global flag at the end of the experession, but it seems to just stip that off when I try passing that to the function. Thoughts?
regex = "Widget";
getRegexFindParams (regex)
function getRegexFindParams (regex) { //CP.getRegexFindParams = function (regex) {
doc=app.ActiveDoc;
docStart = doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;
tloc = new TextLoc (docStart, 0);
findParams = new PropVals ();
propVal = new PropVal ();
propVal.propIdent.num = Constants.FS_FindText;
propVal.propVal.valType = Constants.FT_String;
propVal.propVal.sval = regex;
findParams[0] = propVal;
propVal = new PropVal ();
propVal.propIdent.num = Constants.FS_FindCustomizationFlags;
propVal.propVal.valType = Constants.FT_Integer;
propVal.propVal.ival = 16; // Regular expressions
findParams[1] = propVal;
propVal = new PropVal ();
propVal.propIdent.num = Constants.FS_FindWrap;
propVal.propVal.valType = Constants.FT_Integer;
propVal.propVal.ival=0;
findParams[2] = propVal;
propVal = new PropVal ();
propVal.propIdent.num = Constants.FS_RegexFlavour;
propVal.propVal.valType = Constants.FT_Integer;
propVal.propVal.ival = 1;
findParams[3] = propVal;
foundText = doc.Find(tloc, findParams);
//background highlight found text and get next
