[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
RE: XPL questions (Wildcards)
- Subject: RE: XPL questions (Wildcards)
- From: Harry Binswanger hb@xxxxxxxx
- Date: Tue, 05 Sep 2006 16:37:49 -0400
Brian wrote,
-----Original Message----- From: Harry Binswanger
> Find: {CR}http://{W}{W}{W}{W}{CR}
> Repl: {CR}≪LBhttp://{W}{W}{W}{W}{CR}
> Of course, the simple workaround is to use a loop to search for each URL
inelegant.
. . . NEVER use a "wild string" in a CI without lots of "concrete" text on
either side.
In your example above, the left side of the WS is fine...a CR and the
"http:// is plenty "concrete". But having ONLY a CR after the last WS is
asking for trouble. Your CI (sometimes) will "find" more than you want it
to. I have many times seen the first (or more) CR ignored and the "end" of
the string ends up being miles past where I intended.
Funny you should mention that--it just happened to me an hour ago!
If you're using it to Define, and you're lucky, you'll run out of memory
before it gets to where it thinks the end of the string is. At least then
you'll have a quick indication of a problem. Otherwise it might take
awhile to figure out you have quite a mess (and a lot less file) on your
hands. I often don't find enough consistent text on both sides of a WS to
ensure that it will accurately find exactly what I want it to.
For my money, the "inelegant" way is the only safe way. For your example,
I would find the http://, back the cursor up 7 times, place the bracket,
search for the next CR (if the URL is ALWAYS ended that way), back-up 1
space and place the other bracket. I know it's "ugly" and more work, but
it wouldn't even occur to me, these days, to do that type of transform any
other way.
Thank you Brian. That's an important warning. I really appreciate the
information from one more experienced in markup changes than I. This list
is really great.
Harry Binswanger
hb@xxxxxxxx