Move text
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Move text
If position 48 contains a space followed by 6 more spaces, how can I MOVE the text after the space in position 48 one hundred positions to the right?
Alternatively: If position 48 contains a space followed by 6 more spaces, how can I DELETE the text after the space in position 48?
Alternatively: If position 48 contains a space followed by 6 more spaces, how can I DELETE the text after the space in position 48?
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
[u][b]INPUT:[/b][/u]
[code]0ASMNT-NBR 000000081-3 1991
0000000 6,020.92 602.09 .00 6,623.01
0PAID STATUS PARTIAL PAID
0ASMNT-NBR 000000081-3 1992
0000000 6,531.45 653.14 .00 7,184.59
0PAID STATUS NOT PAID
0ASMNT-NBR 000000108-5 2006
0000000 317.25 31.72 .00 348.97
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1992
0000000 69.07 6.90 .00 75.97
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1993
0000000 75.72 7.57 .00 83.29
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1994
0000000 75.28 7.52 .00 82.80
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1995
0000000 75.65 7.56 .00 83.21
0PAID STATUS NOT PAID[/code]
========================================
[u][b]CORRESPONDING FAULTY OUTPUT:[/b][/u]
[code]0ASMNT-NBR 000000081-3 1991
$1
0PAID STATUS PARTIAL PAID
0ASMNT-NBR 000000081-3 1992
$1
0PAID STATUS NOT PAID
0ASMNT-NBR 000000108-5 2006
$1
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1992
$1
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1993
$1
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1994
$1
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1995
$1
0PAID STATUS NOT PAID[/code]
[code]0ASMNT-NBR 000000081-3 1991
0000000 6,020.92 602.09 .00 6,623.01
0PAID STATUS PARTIAL PAID
0ASMNT-NBR 000000081-3 1992
0000000 6,531.45 653.14 .00 7,184.59
0PAID STATUS NOT PAID
0ASMNT-NBR 000000108-5 2006
0000000 317.25 31.72 .00 348.97
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1992
0000000 69.07 6.90 .00 75.97
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1993
0000000 75.72 7.57 .00 83.29
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1994
0000000 75.28 7.52 .00 82.80
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1995
0000000 75.65 7.56 .00 83.21
0PAID STATUS NOT PAID[/code]
========================================
[u][b]CORRESPONDING FAULTY OUTPUT:[/b][/u]
[code]0ASMNT-NBR 000000081-3 1991
$1
0PAID STATUS PARTIAL PAID
0ASMNT-NBR 000000081-3 1992
$1
0PAID STATUS NOT PAID
0ASMNT-NBR 000000108-5 2006
$1
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1992
$1
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1993
$1
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1994
$1
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1995
$1
0PAID STATUS NOT PAID[/code]
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
I'm sorry about the "Disable BBCode"
I'm running TP 5.3.1
====
INPUT
========================================
CORRESPONDING FAULTY OUTPUT:
I'm running TP 5.3.1
====
INPUT
Code: Select all
0ASMNT-NBR 000000081-3 1991
0000000 6,020.92 602.09 .00 6,623.01
0PAID STATUS PARTIAL PAID
0ASMNT-NBR 000000081-3 1992
0000000 6,531.45 653.14 .00 7,184.59
0PAID STATUS NOT PAID
0ASMNT-NBR 000000108-5 2006
0000000 317.25 31.72 .00 348.97
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1992
0000000 69.07 6.90 .00 75.97
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1993
0000000 75.72 7.57 .00 83.29
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1994
0000000 75.28 7.52 .00 82.80
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1995
0000000 75.65 7.56 .00 83.21
0PAID STATUS NOT PAID========================================
CORRESPONDING FAULTY OUTPUT:
Code: Select all
0ASMNT-NBR 000000081-3 1991
$1
0PAID STATUS PARTIAL PAID
0ASMNT-NBR 000000081-3 1992
$1
0PAID STATUS NOT PAID
0ASMNT-NBR 000000108-5 2006
$1
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1992
$1
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1993
$1
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1994
$1
0PAID STATUS NOT PAID
0ASMNT-NBR 000000138-2 1995
$1
0PAID STATUS NOT PAID-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
My description referred to the original results which was caused by all rows having 6 spaces starting in position 48.
Eliminating the spaces after the last "significant" character of the text and the end of each row resulted in the example of the "faulty output" I sent you. (Apparently, in Configuation/Preferences/Document Classes/Default, ticking "Strip trailing spaces from lines when saving" doesn't work).
Eliminating the spaces after the last "significant" character of the text and the end of each row resulted in the example of the "faulty output" I sent you. (Apparently, in Configuation/Preferences/Document Classes/Default, ticking "Strip trailing spaces from lines when saving" doesn't work).