我有一个文本文件,从pdf连接到文本数据。从文本数据中,我想提取当前的描述,后面跟着字符串“图”。下面是一些文本数据的示例行,
图1-1.给药方案设计的经验方法。这些效果,包括期望的和不良的,是监测后,一个剂量方案的药物,并用来进一步完善和优化方案通过反馈(虚线)。 Derendorf5e_CH01.indd 4Derendorf5e_CH01.indd 4 5/25/19 11:07 PM5/25/19 11:07 第一章.治疗相关性5 另一种看待这两个子学科的方法是,药物动力学处理身体对药物的作用(吸收、分配、代谢、排泄),而药效学则描述药物对人体的作用(既包括期望的效果,也包括不想要的效果)。根据这一定义,人们可能会错误地得出结论,认为这些是相反的椎间盘线,而在现实中,它们是并驾齐驱的。图1-3显示药物动力学处理浓度-时间关系,而药效学描述药物浓度与好(所需)和坏(不良)效应之间的关系。这两个谜团中的每一个都不足以指导治疗和优化剂量;只有将药动学和药效学联系起来(PK/PD)并加以整合,它们才能在治疗上发挥作用。这种整合通常是通过开发数学模型(PK/PD模型)来实现的,这些模型能够捕捉观察到的关系,并允许预测和确定最佳剂量方案。 图1-2.合理设计给药方案。首先定义了该药物的药代动力学和药代动力学.然后,以药物反应和药动学信息作为反馈(虚线),对给药方案进行修改,以达到最佳的药物- apy。对于某些药物,体内形成的活性代谢物也可能需要考虑。
我已经将pdf文件读入文本,并尝试在文本数据上应用re.search和一些regex组合。但没有运气。
# Get files text content
text = file_data['content']
#print(text)
text1 = re.search('FIGURE[ ]*[0-9]-[0-9]. (.*)',text,re.MULTILINE)发布于 2019-08-07 10:04:13
text1 = re.findall('FIGURE\s*[0-9]+-[0-9]+. (.*)',text,re.MULTILINE)
>>> import re
>>> t="""FIGURE 1-1. An empirical approach to the design of a dosage regimen. The effects, both desired and adverse, are monitored after the administration of a dosage regimen of a drug and used to further refine and optimize the regimen through feedback ( dashed line ).
...
... Derendorf5e_CH01.indd 4Derendorf5e_CH01.indd 4 5/25/19 11:07 PM5/25/19 11:07 PM
...
... CHAPTER 1 • Therapeutic Relevance 5
...
... Another way of looking at these two subdisciplines is that pharmacokinetics deals with what the body does to the drug (absorption, distribution, metabolism, excretion), whereas pharmacodynamics describes what the drug does to the body (both desired and undesired effects). From this definition, one could wrongly conclude that these are opposite disci- plines, whereas in reality, they go hand-in-hand. Figure 1-3 shows that pharmacokinetics deals with concentration–time relationships, whereas pharmacodynamics describes the relationship between drug concentration and both good (desired) and bad (adverse) effects. Each of these two puzzle pieces by itself is insufficient to guide therapy and optimize dosing; only when pharmacokinetics and pharmacodynamics are linked (PK/PD) and integrated do they become therapeutically useful. This integration is commonly achieved by developing mathematical models (PK/PD models) that capture the observed relationships and allow prediction and identification of optimum dosing regimens.
...
... FIGURE 1-2. A rational approach to the design of a dosage regimen. The pharmacokinetics and pharmacodynam- ics of the drug are first defined. Then, responses to the drug, coupled with pharmacokinetic information, are used as feedback ( dashed lines ) to modify the dosage regimen to achieve optimal ther- apy. For some drugs, active metabolites formed in the body may also need to be taken into account."""
>>> re.findall('FIGURE\s*[0-9]-[0-9]. (.*)',t,re.MULTILINE)
['An empirical approach to the design of a dosage regimen. The effects, both desired and adverse, are monitored after the administration of a dosage regimen of a drug and used to further refine and optimize the regimen through feedback ( dashed line ).', 'A rational approach to the design of a dosage regimen. The pharmacokinetics and pharmacodynam- ics of the drug are first defined. Then, responses to the drug, coupled with pharmacokinetic information, are used as feedback ( dashed lines ) to modify the dosage regimen to achieve optimal ther- apy. For some drugs, active metabolites formed in the body may also need to be taken into account.']`https://stackoverflow.com/questions/57391705
复制相似问题