https://www.baidu.com a b c </textarea> 要取 <textarea id="content"> -------- </textarea> 中间的红色内容 [regex]::Mat..."/>

Powershell正则取Html标签中间内容

42次阅读
没有评论
<textarea id="content">https://www.baidu.com

a
b
c
</textarea>

要取 <textarea id="content"> --------  </textarea> 中间的红色内容

[regex]::Match( $Text ,"(?<=<textarea id=`"content`">)(.+?\n*)+?(?=</textarea>)").value

正文完
 
评论(没有评论)