在正则表达式中重复字符串后进行 Strat 提取
如何在此序列中提取string_with_letters_and_special_caracters
?
sequence_one \nequence_two\nsequence_third\n string_with_letters_and_special_caracters 0000000\nsequence_four
我无法在string_with_letters_and_special_caracters
之前的最后一个\n
之后开始。 (这里 \n 是重复的字符串。)
例如 \\n(\D+)\d+
从第一个 \n
中提取。
示例:我想在此处提取 - Dimensions : L.
或 Dimensions
,它位于我有模式的表达式之前: https://regex101.com/r/jLqxxo/1
谢谢!
How to extract string_with_letters_and_special_caracters
in this sequence ?
sequence_one \n sequence_two \n sequence_three \n string_with_letters_and_special_caracters 0000000 \n sequence_four
I can't manage to beginning after the last \n
preceding string_with_letters_and_special_caracters
.
(Here \n is the repeated string.)
For example \\n(\D+)\d+
extract from the first \n
.
Example : I want to extract - Dimensions : L.
or Dimensions
here, which precedes an expression I have a pattern for :
https://regex101.com/r/jLqxxo/1
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您似乎想要
查看 正则表达式演示 和 Python 演示:
You seem to want
See the regex demo and the Python demo: