回答編集履歴

3

typo

2023/07/04 01:37

投稿

yambejp
yambejp

スコア114987

test CHANGED
@@ -25,5 +25,5 @@
25
25
  ```
26
26
  追加命題のとおりだと
27
27
  ```sh
28
- perl -p -e 's/(?<=^.{69}?)\. {9}\.//g' test.txt > test_.txt
28
+ perl -p -e 's/(?<=^.{69}?)\. {9}\.//g' test.dat > test_.dat
29
29
  ```

2

調整

2023/07/04 01:36

投稿

yambejp
yambejp

スコア114987

test CHANGED
@@ -15,6 +15,14 @@
15
15
  ```sh
16
16
  perl -p -e 's/(?<=^.{9}?)\. {9}\.//g' test.dat > test_.dat
17
17
  ```
18
+ 結果
19
+ ```text
20
+ 1234567891234567890
21
+ 123456789012345678901234567890
22
+ 1234567891234567890
23
+ 123456789 1234567890
24
+ 123456789012345678901234567890
25
+ ```
18
26
  追加命題のとおりだと
19
27
  ```sh
20
28
  perl -p -e 's/(?<=^.{69}?)\. {9}\.//g' test.txt > test_.txt

1

調整

2023/07/04 01:35

投稿

yambejp
yambejp

スコア114987

test CHANGED
@@ -1,3 +1,21 @@
1
1
  ```sh
2
2
  perl -p -e 's/(?<=^.{6}?)101//g' test.dat > test_.dat
3
3
  ```
4
+ # 参考
5
+ test.dat
6
+ ```text
7
+ 123456789. .1234567890
8
+ 123456789012345678901234567890
9
+ 123456789. .1234567890
10
+ 123456789 1234567890
11
+ 123456789012345678901234567890
12
+ ```
13
+ 上記から10文字目が「ドット」11文字目~19文字目が「スペース」20文字目が「ドット」の文字列だけ削除
14
+
15
+ ```sh
16
+ perl -p -e 's/(?<=^.{9}?)\. {9}\.//g' test.dat > test_.dat
17
+ ```
18
+ 追加命題のとおりだと
19
+ ```sh
20
+ perl -p -e 's/(?<=^.{69}?)\. {9}\.//g' test.txt > test_.txt
21
+ ```