In fact it is -1, not 0, as I just learnt:If nothing is found, the function returns 0 (zero).
Code: Select all
for (var i = 0; i < Document.LineCount; i++) {
x = ScriptUtils.RegExPos("^\\s+", Document.Lines[i], exp);
ShowMessage(x);
}
In fact it is -1, not 0, as I just learnt:If nothing is found, the function returns 0 (zero).
Code: Select all
for (var i = 0; i < Document.LineCount; i++) {
x = ScriptUtils.RegExPos("^\\s+", Document.Lines[i], exp);
ShowMessage(x);
}