Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
HTML ファイルを文字列として取得し、すべて<img src="http:.../../filename.png ..>を<img src="id:filename.png>正規表現でどのように行うことができますか?に変更したいと考えています。
<img src="http:.../../filename.png ..>
<img src="id:filename.png>
私はこれまでにこれを得ました:
urls = re.findall(r'src=[\'"]?([^\'" >]+)', html) allUrls = ', '.join(urls)