to delete alternatively
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 6
- Joined: Fri Oct 06, 2006 3:38 pm
to delete alternatively
hi iam new to wildedit
whats the easiest way to delete all lines(everything) untill special word comes(delete including that)
example
12 12 12 12 12 12
12 12 12 12 12 12
12 12 12 12 12 12 22 xx a1 a2 a3 a4 a5 a6 yy c1 c2 xx zz
12 12 12 12 12 12
12 12 12 21 12 12
12 12 12 12 12 12 xx b7 b8 b9 b0 b1 b2 yy zz c3 c4 yy
final result should be
123456
789012
task is to delete everything untill 'xx' comes(including xx),(xx should be first xx in the line)
and then to delete one space and one character or numeric
untill 'yy' comes (including yy)
this should be edited for 1000's of lines
please help me
whats the easiest way to delete all lines(everything) untill special word comes(delete including that)
example
12 12 12 12 12 12
12 12 12 12 12 12
12 12 12 12 12 12 22 xx a1 a2 a3 a4 a5 a6 yy c1 c2 xx zz
12 12 12 12 12 12
12 12 12 21 12 12
12 12 12 12 12 12 xx b7 b8 b9 b0 b1 b2 yy zz c3 c4 yy
final result should be
123456
789012
task is to delete everything untill 'xx' comes(including xx),(xx should be first xx in the line)
and then to delete one space and one character or numeric
untill 'yy' comes (including yy)
this should be edited for 1000's of lines
please help me
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
Playing back what you need in other words:
Keep everything between xx and yy, drop the xx and yy, and remove first letter of each word, and the spaces that remain on what remains.
Is that correct?
I suspect that this may need to be done in multiple passes, will that be OK?
Keep everything between xx and yy, drop the xx and yy, and remove first letter of each word, and the spaces that remain on what remains.
Is that correct?
I suspect that this may need to be done in multiple passes, will that be OK?
Hope this was helpful.............good luck,
Bob
Bob
-
- Posts: 6
- Joined: Fri Oct 06, 2006 3:38 pm
hi
i need need the commands for that please
-
- Posts: 6
- Joined: Fri Oct 06, 2006 3:38 pm
hi
u know iam new to wild edit!!!!!!!!
i need step by step procedure to edit that file
i need step by step procedure to edit that file
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
There is probably an easier method, but this worked on the sample you provided. Using TextPad tools, not WildEdit.
Multiple passes, Check box in Regular Expressions, Editor using POSIX
Ignore quote symbols ("), use values inside the quotes.
All Replace settings use Active Document.
May want to make a copy of document after each step in case of errors.
================================
Start here
1. Find Mark All with "^.*xx(.*)"
2. Search/Invert All Bookmarks
3. Edit/Delete/Bookmarked Lines
Now only have the lines to be processed
4. Search/Replace "^.*xx(.*)yy.*" with \1
5. Search/Replace "yy.*\n" with \n
6. Search/Replace "[a-z]" with nothing
7. Search/Replace "[[:space:]]" with nothing
=====================
Result is:
123456
789012
Multiple passes, Check box in Regular Expressions, Editor using POSIX
Ignore quote symbols ("), use values inside the quotes.
All Replace settings use Active Document.
May want to make a copy of document after each step in case of errors.
================================
Start here
1. Find Mark All with "^.*xx(.*)"
2. Search/Invert All Bookmarks
3. Edit/Delete/Bookmarked Lines
Now only have the lines to be processed
4. Search/Replace "^.*xx(.*)yy.*" with \1
5. Search/Replace "yy.*\n" with \n
6. Search/Replace "[a-z]" with nothing
7. Search/Replace "[[:space:]]" with nothing
=====================
Result is:
123456
789012
Hope this was helpful.............good luck,
Bob
Bob
-
- Posts: 6
- Joined: Fri Oct 06, 2006 3:38 pm
hi
sorry to distrub u again.
ur information is very helpful for me
thankyou verymuch for ur help
i forgot to ask u b4
example
12 32 13 45 aa 65 98 65
54 21 54 32 21 87 98
65 54 21 65 aa 54 87 01 02
result
2235a585
5415a4712
(i.e line which dont have 'aa' should be deleted entierly
then first character or number of all should be deleted
lastly i need to align all lines with 1 line spacing)
ur information is very helpful for me
thankyou verymuch for ur help
i forgot to ask u b4
example
12 32 13 45 aa 65 98 65
54 21 54 32 21 87 98
65 54 21 65 aa 54 87 01 02
result
2235a585
5415a4712
(i.e line which dont have 'aa' should be deleted entierly
then first character or number of all should be deleted
lastly i need to align all lines with 1 line spacing)
-
- Posts: 6
- Joined: Fri Oct 06, 2006 3:38 pm
hi
now iam able to delete lines without aa
i just want help to delete two spacing after the first one
example
12 12 12 12 32 32 54
54 65 65 65 65 65 65
result
2222224
4555555
i just want help to delete two spacing after the first one
example
12 12 12 12 32 32 54
54 65 65 65 65 65 65
result
2222224
4555555
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
-
- Posts: 6
- Joined: Fri Oct 06, 2006 3:38 pm
hi
thank u so much 4 ur help
lastly how to make 1 line spacing after each line
thanks for ur help again
lastly how to make 1 line spacing after each line
thanks for ur help again
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact: