I am trying to use sourceSearch to look for a string in a way that is case insensitive.
I experimented with a regular expression but without success.
First I tried using the i flag as in regex=/string/i
That does not work because Kantu itself adds the slashes // around the regular expression of the user.
Next I tried to use a mode modifier specification in the regexp as in regex=(?i)string or regex=string(?i)
That does not work either. I get Invalid regular expression: …: Invalid group
Is there a way to make sourceSearch case insensitive?
Thanks
FYI my search string happens to be >a b</a and the regular expression reported by the error message is /(?i)>a b</a/
If it only were that simple. a b in this case represents a first name and a last name. I will have to loop over many names: a b, John Doe, jane doe, karla Marks, ABE LINCOLN, etc. Hence the string is not all that predictable.
By the way, I did manage to use regexp with storeEval, and case insensitive works there with /…/i Maybe instead of sourceSearch, as a workaround, I can dump the full html into a variable and then apply storeEval.
Ok, got it. In any case, the real solution will be to slightly change the syntax of sourceSearch, so that a command like regex=/string/i works => I created a ticket for this.