in reply to searching strings in text files

If you're using the lines of file 'A' as a regexp to match in file 'B', the problem you're experiencing is that most non-alpha characters have special meaning in regexps. What you need to do, if you require a regexp match based on the contents of file 'A', is to use quotemeta to prepare the search string so that its content won't be interpreted as regexp special characters.


Dave

Replies are listed 'Best First'.
Re^2: searching strings in text files
by sashac88 (Beadle) on Jul 25, 2004 at 06:49 UTC
    Thanks a lot.It worked like miracle.Quick and great solution.
    Thanks.