China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-10 06:57
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] Example of extracting content from a txt file View 712 Replies 2
Original Poster Posted 2008-10-31 13:13 ·  中国 广东 广州 电信
初级用户
★★
Credits 131
Posts 119
Joined 2007-06-12 22:50
19-year member
UID 91125
Gender Male
From gz
Status Offline
Below is one part of the content in the TXT. I want to compare the clipboard content with the TXT file and extract the related content.

If I use ctrl+c to copy the content “maintenance centered on inspection and adjustment”, then press crtl+F12, compare the clipboard content with the TXT file, the related content obtained is the following
Question 1: Maintenance centered on inspection and adjustment is called ( ) maintenance.
Answer: , second-level”


Below is the TXT content:
Question 1: Maintenance centered on inspection and adjustment is called ( ) maintenance.
Answer: , second-level
Question 2: The axle that can realize both wheel steering and driving is called ( ).
Answer: , steering drive axle
Question 3: Whoever illegally prints, forges, alters, resells, rents out, or lends the “Special Equipment Operator Certificate”, or uses an illegally printed, forged, altered, resold, rented out, or lent “Special Equipment Operator Certificate”, shall be fined ( ); if a crime is constituted, criminal responsibility shall be pursued according to law.
Answer: , less than 1000
Question 4: If certified operating personnel obtain the “Special Equipment Operator Certificate” by cheating in the exam or by other deceptive means, they shall be given ( ) punishment.
Answer: , revocation of the certificate
Floor 2 Posted 2008-10-31 13:55 ·  美国 惠普HP
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Q: How do I get the clipboard content?
A: Search this board for clipboard

Q: How do I compare them?
A: for + findstr
Floor 3 Posted 2008-10-31 14:15 ·  中国 江西 赣州 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
What do you mean?
Forum Jump: