I have a tags plugin that I'm adding features to. In order to test that it is working correctly, I need to examine the tags inside a tags file. I am trying to make sure the correct tags appear in the file and they are not there too many times. My test code is in VimL/Vimscript, so this is a VimL question.
One way to do this is to have the tags file open in a Vim buffer, and then use the search() function to search for that text. Then I just check to see if it appears at the beginning of the line. The problem is search() accepts a regular expression, which is not what I am providing it.
I could bring in each line as a string and examine them one at a time, but that sounds slow and like more work compared to getting search() to work for me.
How can I get search() to work without regular expressions, or in some other way find the tags matching a non-regular expression search in a tags file?