正则表达式从位置 13 到行尾匹配
示例字符串:
DFDBDFDFDF21R123
DFDBDFDFDF21DFD
我需要一个正则表达式,运行时与以下内容匹配:
R123
DFD
(无 EOL 字符)
谢谢,我希望有一个我的大脑没有想到的简单解决方案。
Example strings:
DFDBDFDFDF21R123
DFDBDFDFDF21DFD
I need a regex that when run matches ths following:
R123
DFD
(no EOL chars)
Thanks, I hope there is a simple solution that my brain isn't conjuring.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

发布评论
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
第一部分将查找前 12 个字符并将其丢弃,第二部分将对其余字符进行分组。
编辑:正如其他人指出的那样,您确实应该在您使用的任何语言中使用子字符串。正则表达式太过分了。
The first part will look for the first 12 characters and throw them out, and the second part will group the rest.
Edit: as others have pointed out, you really should just use substring in whatever language you're using. Regex is overkill.