第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

使用 Python 在包含給定單詞的標(biāo)簽之間提取文本

使用 Python 在包含給定單詞的標(biāo)簽之間提取文本

躍然一笑 2021-10-19 16:53:45
我有一些來自 XML 文檔的文本,我試圖在其中提取包含某些單詞的標(biāo)簽中的文本。例如下面:search('adverse')應(yīng)該返回包含單詞“adverse”的所有標(biāo)簽的文本Out:   [    "<item>The most common adverse reactions reported in subjects receiving coadministered dutasteride and tamsulosin were impotence, decreased libido, breast disorders (including breast enlargement and tenderness), ejaculation disorders, and dizziness.</item>"  ]和 search('clinical')應(yīng)該返回兩個(gè)結(jié)果,因?yàn)閮蓚€(gè)標(biāo)簽包含這些詞。Out:   [    "<title>6.1 Clinical Trials Experience</title>",     "<paragraph id="ID41">The clinical efficacy and safety of coadministered dutasteride and tamsulosin, which are individual components of dutasteride and tamsulosin hydrochloride capsules, have been evaluated in a multicenter, randomized, double-blind, parallel group trial (the Combination with Alpha-Blocker Therapy, or CombAT, trial) </paragraph>"  ]為此我應(yīng)該使用哪些工具?正則表達(dá)式?BS4?任何建議都非常感謝。示例文本: </highlight> </excerpt> <component> <section id="ID40"> <id root="fbc21d1a-2fb2-47b1-ac53-f84ed1428bb4"></id> <title>6.1 Clinical Trials Experience</title> <text> <paragraph id="ID41">The clinical efficacy and safety of coadministered dutasteride and tamsulosin, which are individual components of dutasteride and tamsulosin hydrochloride capsules, have been evaluated in a multicenter, randomized, double-blind, parallel group trial (the Combination with Alpha-Blocker Therapy, or CombAT, trial) </paragraph> <list id="ID42" listtype="unordered" stylecode="Disc"> <item>The most common adverse reactions reported in subjects receiving coadministered dutasteride and tamsulosin were impotence, decreased libido, breast disorders (including breast enlargement and tenderness), ejaculation disorders, and dizziness.</item>
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 194 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)