使用捕获组重用模式 - js [英] Reuse patterns using capture groups - js

查看:124
本文介绍了使用捕获组重用模式 - js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读了一些关于这个子主题的文章,但我不理解。



有人可以通过一些例子更容易地解释它吗?



thnx很多!



我尝试了什么:



阅读指南,并搜索一些文章

i read some articles about this sub subject but i did not understand it.

can someone explain it in easier way, with some examples?

thnx a lot!

What I have tried:

read guides, and search for some articles

推荐答案

引用:

我读了一些关于这个子主题的文章,但我不明白。

i read some articles about this sub subject but i did not understand it.



你要逐一询问关于RegEx的每一个问题。正确学习,它将使您的理解更加轻松。

建议:在您的浏览器上打开2个标签,首先使用RegEx文档,然后使用其他 Debuggex 或您选择的其他RegEx,然后在进入下一部分之前阅读一些内容并进行实验。

Debuggex将向您显示一个很好的RegEx图表,数据框将显示与您的字符串匹配的内容,它甚至允许您查看匹配的过程。



以下是RegEx文档的链接:

perlre - perldoc.perl.org [ ^ ]

以下是帮助构建RegEx并调试它们的工具的链接:

.NET Regex测试员 - 正则表达式风暴 [ ^ ]

Expresso正则表达式工具 [ ^ ]

RegExr:Learn,Build,&测试RegEx [ ^ ]

在线正则表达式测试器和调试器:PHP,PCRE,Python,Golang和JavaScript [ ^ ]

这个显示RegEx是一个很好的图表,它非常有助于理解RegEx的作用: Debuggex:在线可视正则表达式测试器。 JavaScript,Python和PCRE。 [ ^ ]

此网站还在一个漂亮的图表中显示正则表达式,但无法测试与RegEx匹配的内容: Regexper [ ^ ]


You are asking every question, about RegEx, one by one. Learn it properly, it will ease your understanding.
Advice: open 2 tabs on your browser, first with RegEx documentation and the other Debuggex or another RegEx of your choice, then read something and experiment before going to next part.
The Debuggex will show you a nice graph of the RegEx, and the data box will show what match your strings, it even allow you to see the matching process.

Here is a link to RegEx documentation:
perlre - perldoc.perl.org[^]
Here is links to tools to help build RegEx and debug them:
.NET Regex Tester - Regex Storm[^]
Expresso Regular Expression Tool[^]
RegExr: Learn, Build, & Test RegEx[^]
Online regex tester and debugger: PHP, PCRE, Python, Golang and JavaScript[^]
This one show you the RegEx as a nice graph which is really helpful to understand what is doing a RegEx: Debuggex: Online visual regex tester. JavaScript, Python, and PCRE.[^]
This site also show the Regex in a nice graph but can't test what match the RegEx: Regexper[^]


这篇关于使用捕获组重用模式 - js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆