added ignore comment and string flag to find substring function. also fixed a but with the previous implementation of the ignoring..