How can I insert an "......." in a column??? Plea
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
How can I insert an "......." in a column??? Plea
I will like to insert an ascii character, " ", in a file, that has already being created, to all the items between lines 15 and 19. Is that possible? If yes, how can I do this? Please help!!!!!!!!!
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
This is not clear. Please give examples of the text as it is now and as you would like it to be. Enclose your examples in [/color][/b] tags (without the space I've added to stop the tags being interpreted), to preserve the layout of the examples.
Code: Select all
[/color][/b] ... [b][color=blue]
Please help!!!!!
This is the before file. Note no " " in 4th column.
"Vendor Stk Nbr Item Nbr Item Desc 1 Store Nbr Store Name WM Wee
1201 245505 BLKBEAUT SHEA BTR DP 930 MONTGOMERY, AL 200712
1201 245505 BLKBEAUT SHEA BTR DP 938 MONTGOMERY, AL 200702
1201 245505 BLKBEAUT SHEA BTR DP 949 DALLAS ,TX 200702
1201 245505 BLKBEAUT SHEA BTR DP 961 LA PLACE, LA 200702
This is the file after
Vendor Stk Nbr Item Nbr Item Desc 1 Store Nbr Store Name WM Week
1201 245505 BLKBEAUT SHEA BTR DP 62 "BLYTHEVILLE, AR " 200705
1201 245505 BLKBEAUT SHEA BTR DP 83 "MAGNOLIA, AR" 200705
1201 245505 BLKBEAUT SHEA BTR DP 87 "MINDEN, AR" 200705
1201 245505 BLKBEAUT SHEA BTR DP 448 "SHREVEPORT , LA" 200705
1201 245505 BLKBEAUT SHEA BTR DP 483 "PRATTVILLE, AL" 200705
1201 245505 BLKBEAUT SHEA BTR DP 488 "QUINCY, FL" 200705
1201 245505 BLKBEAUT SHEA BTR DP 539 "ALEXANDRIA, LA" 200705
1201 245505 BLKBEAUT SHEA BTR DP 588 "ALBANY, GA" 200705
1201 245505 BLKBEAUT SHEA BTR DP 707 "CLARKSDALE, MS" 200705
1201 245505 BLKBEAUT SHEA BTR DP 763 "FAIRFIELD, AL" 200705
1201 245505 BLKBEAUT SHEA BTR DP 862 "HINESVILLE, GA" 200705
"Vendor Stk Nbr Item Nbr Item Desc 1 Store Nbr Store Name WM Wee
1201 245505 BLKBEAUT SHEA BTR DP 930 MONTGOMERY, AL 200712
1201 245505 BLKBEAUT SHEA BTR DP 938 MONTGOMERY, AL 200702
1201 245505 BLKBEAUT SHEA BTR DP 949 DALLAS ,TX 200702
1201 245505 BLKBEAUT SHEA BTR DP 961 LA PLACE, LA 200702
This is the file after
Vendor Stk Nbr Item Nbr Item Desc 1 Store Nbr Store Name WM Week
1201 245505 BLKBEAUT SHEA BTR DP 62 "BLYTHEVILLE, AR " 200705
1201 245505 BLKBEAUT SHEA BTR DP 83 "MAGNOLIA, AR" 200705
1201 245505 BLKBEAUT SHEA BTR DP 87 "MINDEN, AR" 200705
1201 245505 BLKBEAUT SHEA BTR DP 448 "SHREVEPORT , LA" 200705
1201 245505 BLKBEAUT SHEA BTR DP 483 "PRATTVILLE, AL" 200705
1201 245505 BLKBEAUT SHEA BTR DP 488 "QUINCY, FL" 200705
1201 245505 BLKBEAUT SHEA BTR DP 539 "ALEXANDRIA, LA" 200705
1201 245505 BLKBEAUT SHEA BTR DP 588 "ALBANY, GA" 200705
1201 245505 BLKBEAUT SHEA BTR DP 707 "CLARKSDALE, MS" 200705
1201 245505 BLKBEAUT SHEA BTR DP 763 "FAIRFIELD, AL" 200705
1201 245505 BLKBEAUT SHEA BTR DP 862 "HINESVILLE, GA" 200705
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
It is not clear that this is the same problem as the one you mentioned in your original post.
You didn't use[/color][/b] tags, as I requested, but I managed to extract your examples from the source of this page.
If I understand correctly, you want to put double quotes around the eighth column of your data, where the columns are separated by inconsistent white space, except that the eighth column is everything that isn't one of the first seven columns or the last column (which is all digits). Is that right? If so, this might do what you want:
You didn't use
Code: Select all
[/color][/b] ... [b][color=blue]
If I understand correctly, you want to put double quotes around the eighth column of your data, where the columns are separated by inconsistent white space, except that the eighth column is everything that isn't one of the first seven columns or the last column (which is all digits). Is that right? If so, this might do what you want:
This assumes you are using Posix regular expression syntax:Find what: ^(([^ \t]+[ \t]+){7})(.+)([ \t]+[0-9]+)
Replace with: \1"\3"\4
[X] Regular expression
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax