|Cannot get instr function to work .net?
For some reason, the 'instr' function and the 'string.indexof' is the same.
The problem is that one of the 2 string arguments, is a variable that is passed from the calling subroutine (not the literal characters) and it does not recognise the 'match'.
When I type in the literal characters with " " -- it works ok.
Here is a copy of the line that is not working.
'm' is the positional marker / 'largetxt' the body that is being searched and 'smalltxt' is the string that is being searched for.
intx = InStr(m, mainTxt, smallTxt)
The variable 'smallTxt' is the problem ---- if I have:
intx = InStr(m, mainTxt, "house") --- it works ok
Also ... same thing for:
intx = largeTxt.IndexOf(smallTxt, m)