Home > Software engineering >  How to filter the text in a text box 1 (content item) text box into a title in a row after filtering
How to filter the text in a text box 1 (content item) text box into a title in a row after filtering

Time:10-03

How to filter the text in a text box 1 (content item) text box into a title in a row after filtering content, all other filtering all
try text download: http://pan.baidu.com/s/1eQEf9AU

paper text is


hope effect after filtration is


Thank you for your reply you great god first

CodePudding user response:

add fetching qid and score between these content, if qid contain Spaces between score and also want to retain, other filtering

Such as
[question] 2 XXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX (2.0)
The filtered keep
XXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

CodePudding user response:

Dim w1, w2, ww, wt, I, j
W1="all exam content... "
Ww=split (w1, "] ")
For I=1 to ubound (ww) "the first is not the topic
W2=split (ww (I), "a:") (0) 'to remove the answer section
J=instrrev (w2, "(")" reverse for the first (
W1=left $(w2, j - 1) 'to get pure topic
The debug. Print w1
next

CodePudding user response:

refer to the second floor Topc008 response:
dim w1, w2, ww, wt, I, j
W1="all exam content... "
Ww=split (w1, "] ")
For I=1 to ubound (ww) "the first is not the topic
W2=split (ww (I), "a:") (0) 'to remove the answer section
J=instrrev (w2, "(")" reverse for the first (
W1=left $(w2, j - 1) 'to get pure topic
The debug. Print w1
Next


text box finally show only the last question

Dim w1, w2, ww, wt, I, j
Ww=Split (txtText1. Text, "] ")
For I=1 To UBound (ww) "the first is not the topic
W2=Split (ww (I), "a:") (0) 'to remove the answer section
J=InStrRev (w2, "(")" reverse for the first (
W1=Left $(w2, j - 1) 'to get pure topic
TxtText1. Text=w1 & amp; VbCrLf
Next

CodePudding user response:

 Sub test () 
Dim w1, w2, ww, wt, I, j
W1="all exam content... "
Ww=Split (w1, "] ")
For I=1 To UBound (ww) "the first is not the topic
W2=Split (ww (I), "a:") (0) 'to remove the answer section
J=InStrRev (w2, "(")" reverse for the first (
W2=Left $(w2, j - 1) 'to get pure topic
W1=w1 & amp; The IIf (w1 & lt;> "", vbCrLf," ") & amp; W2
Next
TxtText1. Text=w1
End Sub

CodePudding user response:

Well, thank you, actually I also is about the change, but in the end the contents of a text box to appear is not deal with the text content of original + filter is a good one at the end of a line, the content of the
. I think the last txtText1 appears directly in the text processing good one line of the content of the
Because no processing of paper text contents is on txtTEXT1. Text in
So I am so written, but the result like you above the
Dim w1, w2, ww, wt, I, j
W1=txtText1. Text
Ww=Split (w1, "] ")
For I=1 To UBound (ww) "the first is not the topic
W2=Split (ww (I), "a:") (0) 'to remove the answer section
J=InStrRev (w2, "(")" reverse for the first (
W2=Left $(w2, j - 1) 'to get pure topic
W1=w1 & amp; The IIf (w1 & lt;> "", vbCrLf," ") & amp; W2
Next
TxtText1. Text=w1

CodePudding user response:

The
reference 4 floor Topc008 reply:
 Sub test () 
Dim w1, w2, ww, wt, I, j
W1="all exam content... "
Ww=Split (w1, "] ")
For I=1 To UBound (ww) "the first is not the topic
W2=Split (ww (I), "a:") (0) 'to remove the answer section
J=InStrRev (w2, "(")" reverse for the first (
W2=Left $(w2, j - 1) 'to get pure topic
W1=w1 & amp; The IIf (w1 & lt;> "", vbCrLf," ") & amp; W2
Next
TxtText1. Text=w1
End Sub


Well, thank you, actually I also is about the change, but in the end the contents of a text box to appear is not deal with the text content of original + filter is a good one at the end of a line, the content of the
. I think the last txtText1 appears directly in the text processing good one line of the content of the
Because no processing of paper text contents is on txtTEXT1. Text in
So I am so written, but the result like you above the
Dim w1, w2, ww, wt, I, j
W1=txtText1. Text
Ww=Split (w1, "] ")
For I=1 To UBound (ww) "the first is not the topic
W2=Split (ww (I), "a:") (0) 'to remove the answer section
J=InStrRev (w2, "(")" reverse for the first (
W2=Left $(w2, j - 1) 'to get pure topic
W1=w1 & amp; The IIf (w1 & lt;> "", vbCrLf," ") & amp; W2
Next
TxtText1. Text=w1
  • Related