[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

XPL questions



I'm doing some heavy XPL programming to convert text into html. Two
questions have arisen.
1. I've found a number of times when I try to use a CI /// with both
wildcards (especially the wild-W) and a carriage return or two that I get a
spurious error message about wildcards having to be in the same order in
the search and replace. This has come up repeatedly, and, though I've
checked the order, it seems right.
Generally, I can get the job accomplished by using two 2 CIs, with the
first one replacing the carriage returns with something like a tab
character. The wildcard CI works if the carriage returns are not in it. In
the past, I've had some logic errors, pointed out by Robert, as I recall,
but I have a hard time believing this is always the case in such failures.
Have more experienced XPL programmers noted some similar limitations with
wildcard CIs?
2. Doing the following SEarch from the command line puts the cursor in an
unexpected place--one character to the right of where it "should" be:

SE /{not}{CR}{CR}{not}{CR}/

That's: not-CarriageReturn, CarriageReturn, not-CarriageReturn

For instance, suppose the text is:

Now is{CR}the time
I expect the SEarch to land on the "h" of "the" but it lands on the "e" of "the."
To explain this behavior, all I can think of is that {CR} is actually two
bytes. But if you SEarch for just not-CarriageReturn, CarriageReturn, it
works as expected.

Thanks.

Harry Binswanger
hb@xxxxxxxx