[Info-vax] SEARCH ''
George Cornelius
cornelius at eisner.decus.org
Tue Jan 25 09:05:36 EST 2022
David Jones <osuvman50 at gmail.com> wrote:
> On Monday, January 17, 2022 at 3:52:13 PM UTC-5, Phillip Helbig (undress to reply) wrote:
>> I had occasion to SEARCH for the string '' in a file.
>>
>> Is there any way to do this? (It gets expanded as an empty symbol; I
>> don't know how to prevent that.)
>>
>
> $ dsq = "'" + "'" ! make symbol containing 2 single quotes
> $ search myfile.txt &dsq
What's wrong with the old familiar way?
$ search myfile.txt "''dsq'" ?
This has benefits as well when searching for more complex sequences:
$ pip tick="'" ; search myfile.txt "''tick'''tick'MYSYMBOL''tick'"
I don't use &symbol often because I'm not sure I understand
precisely how it differs from the ''symbol' embedded in DQ's.
George
More information about the Info-vax
mailing list