正则表达式 – 什么文本编辑器支持将找到的结果提取到另一个文件
发布时间:2020-12-14 05:56:41 所属栏目:百科 来源:网络整理
导读:通常我有以下情况: 有一个PONO类,包含属性列表. public string UserName { get { return this.userName; } set { if (this.userName != value) { SetDirty(); this.userName = value; } } } public string Password { get { return this.password; } set {
通常我有以下情况:
有一个PONO类,包含属性列表. public string UserName { get { return this.userName; } set { if (this.userName != value) { SetDirty(); this.userName = value; } } } public string Password { get { return this.password; } set { if (this.password != value) { SetDirty(); this.password = value; } } } public string Email { get { return this.email; } set { if (this.email != value) { SetDirty(); this.email = value; } } } public string Title { get { return this.title; } set { if (this.title != value) { SetDirty(); this.title = value; } } } 是否有工具,最好是Notepad或VS插件,将正则表达式输出提取到另一个文件中? 例如:查找:“public string(.*)$”结果: UserName Password Email Title 在一个新文件中. 解决方法
在记事本中使用“搜索/查找”对话框并在“标记”选项卡中选中“书签行”复选框 – 在“标记全部”之后,您将在所有所需的行上显示书签.
最后一步是搜索/书签/复制书签行并将其粘贴到新文件中,您可以在其中删除公共字符串部分. 从v5.8.7更改日志: >为了减少混淆,在“查找/替换”对话框中创建了“全部标记”功能的新“标记”选项卡. 我想Bookmark行复选框和Mark all都放在v5.8.6的另一个标签中. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |