Practically any non-alpha character can be used for a separator in the
change/replace command. I routinely use commas, periods, backslash, forward
slash, bar, even semicolons and single quotes will work. But in the case you
show (FIRST^253HARI/PROG) and you want to get rid of the last value. I would
use the line break (B) and delete the line created. (ex. B T will break the
at the T, press enter to go to the next line which should be ^253HARI/PROG,
then use D to delete the line).
----- Original Message -----
From: "Gary Gowans" <[EMAIL PROTECTED]>
To: <u2-users@listserver.u2ug.org>
Sent: Tuesday, January 24, 2006 10:22 AM
Subject: Re: [U2] UniVerse:ED:Query
Hari T. K. Varma wrote:
Hi All,
In ED I would like how can I change/replace a text containing
the delimiter itself i.e. "\" as part of the text to be replaced
e.g.
0001: FIRST^253HARI/PROG
In the above line I would like to delete ^253HARI/PROG
Thanks in Advance,
-Hari
Sorry for the slow response... I'm an occassional digester!
Anyway, most responses have suggested the simple solution of using another
delimiter (any of : , . - \ etc will do). All very sensible (especially in
this example).
However, when faced with a long, complex string to chop from the end of a
line (with multi-values or not) I find the 'B'reak facility very useful.
B x... allows you to 'break' a line into two after the x... part.
In Hari's example you'd just do
:B ST<rtn>
(B T would do, I just like to use 2 or more characters for certainty, B
FIRST would work too)
This creates a new line 002... So rtn past line 2 thus:
002 ^253HARI/PROG
:
and type DE to delete the line
Easy?
It can also be used to take a large chunk out of the middle of a long
attribute.
Just break before and after the bit you want to remove, delete the
resulting offending line and use CAT (after the first line before the 3rd,
now 2nd line) to join them back together again
Thus:
001 a long piece of text or whatever and <the bit to be removed> some more
stuff etc, etc
:B ever and <rtn>
gives:
001 a long piece of text or whatever and
002<the bit to be removed> some more stuff etc, etc
then
:B ved><rtn>
gives:
001 a long piece of text or whatever and
002<the bit to be removed>
003 some more stuff etc, etc
DElete line 2 then
001 a long piece of text or whatever and
:CAT
gives:
001 a long piece of text or whatever and some more stuff etc, etc
Sorry if that's teaching you all to suck eggs, it's really aimed at Hari
(who, I'm guessing is fairly new to the game)?
I found the technique great for chopping large items (oh for a decent GUI
style editor!) and more reliable than having to 'match' long strings of
text, etc to 'C'hange/'R'eplace them.
Notes:
CAT xxx - will stick xxx in between the concatenated lines
'B' on its own will go to the bottom of the item!
Regards,
Gary ('why use one word when several will confuse and irritate?') Gowans
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/