简体   繁体   English

文本板中的正则表达式-删除引号内未包含的所有文本

[英]Regex in Textpad - Remove all text that is not enclosed inside quotes

I am using Textpad to edit some text in which I need to do the following transformation, 我正在使用Textpad编辑一些需要进行以下转换的文本,

Original Text 原文

<ds:column name="REFRIGERATE" type="String" />
<ds:column name="REORDER_DRUG_ID" type="Double" />

Should become 应该成为

REFRIGERATE            String
REORDER_DRUG_ID        Double

I need to extract everything that is in quotes and delete everything else. 我需要提取引号中的所有内容并删除其他所有内容。

"(.*?)" is not helping me.

Try following. 请尝试以下。

Find : .+?((?<=")[^ ]+(?="))|"[^"]+$ 查找: .+?((?<=")[^ ]+(?="))|"[^"]+$

Replace : \\1\\t 替换: \\1\\t

I don't have TextPad installed but tested with Notepad++ assuming both should be similar. 我没有安装TextPad但假设两者应该相似,并且使用Notepad++进行了测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM