regex - 需要正则表达式中的建议
问题描述
正则表达式:
.?Description(?:(?!;).)*|.?Resolution(?:(?!;).)*|.?Root Fix(?:(?!;).)*
输入字符串:
" description: this is first line .
this is second line .
this is thrird ;
and this is some random redundant line "
预期输出:
“description: this is first line .
this is second line .
this is thrird ;”
电流输出:
“description: this is first line .”
任何人都可以更改此表达式以考虑 . 左侧的任何内容(空白行/空格);
。
解决方案
推荐阅读
- angular - Collapsing items in dx-forms
- sinon - 就 Sinon spy 的最新通话参数进行断言
- .htaccess - 转发“maindomain”,但保持“maindomain/en/”等仍然有效
- python - 尽管根据 getchildren() 存在子元素,python lxml 无法识别子元素
- vb.net - 如何在 Dim NormalVectorRotationMatrix As New devDept.Geometry.Matrix 之后将元素添加到矩阵
- api - OneLogin API 凭据
- powershell - 使用凭据启动作业失败,错误用户名/密码不正确
- javascript - 如何将 Django 变量传递给 Vue 道具
- python-3.x - 如何在向 keras 中的神经网络提供输入的同时使用两个不同的生成器?
- javascript - 标签文本未在 MUIDataTable ReactJS 中更新