问题描述
您好,尊敬的专家!
我有一个名为TxtMedications的RTF字段它包含多行文本,其中每一行显然都以< div>开头。标签。例如:
Lacosamide 200 mg bid
Divalproex ER 1500 mg qhs
普瑞巴林50 mg q8h
布洛芬400毫克tid PRN
西替利嗪每日10毫克PRN
或以字符串形式...
< div>拉科酰胺200 mg bid< / div>
< div> Divalproex ER 1500 mg qhs< / div>
< div>普瑞巴林50 mg q8h< ; / div>
< div>布洛芬400毫克tid PRN< / div>
< div>西替利嗪每日10毫克PRN< / div>
我正在尝试做什么(以及我目前所处的位置)将所有包含字符串PRN的行分开。到另一个RTF文本框,称为TxtPRNMeds并将其余部分放入名为TxtScheduledMeds的RTF文本框中。
我能够使用InStr()和Mid()函数返回标签之间的第一个文本字符串,并搜索该字符串中的PRN。 />
Hello, esteemed experts!
I have a RTF field called "TxtMedications" that contains multiple lines of text, each of these obviously preceded by a <div> tag. For example:
Lacosamide 200 mg bid
Divalproex ER 1500 mg qhs
Pregabalin 50 mg q8h
Ibuprofen 400 mg tid PRN
Cetirizine 10 mg daily PRN
Or in string form...
<div>Lacosamide 200 mg bid</div>
<div>Divalproex ER 1500 mg qhs</div>
<div>Pregabalin 50 mg q8h</div>
<div>Ibuprofen 400 mg tid PRN</div>
<div>Cetirizine 10 mg daily PRN</div>
What I''m trying to do (and where I''m currently stuck) is separating out all lines which contain the string "PRN" into another RTF text box, called "TxtPRNMeds" and having the remainder put into a RTF text box called "TxtScheduledMeds".
I''m able to use the InStr() and Mid() functions to return the first string of text between the tags and search that string for "PRN".
这篇关于需要在RTF字段/返回包含特定字符串的行中搜索每一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!