学习正则表达式 [英] learning Regular expression

查看:68
本文介绍了学习正则表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为此测试而苦苦挣扎

(我已经完成其他测试)

http://regexone.com/example/4 [

i am struggling with this test

(i have completed other test)

http://regexone.com/example/4[^]

Any help?

推荐答案

我们不做作业!但是...
这很简单:请看一下使用"|"运算符捕获单独的组.

首先将文件名捕获为一个命名组,然后将文件扩展名捕获为一个单独的组,该组具有特定的文本字符串,并用"|"字符分隔.

仅仅给您解决方案就很难给您更多的收益,而如果我这样做的话,您也不会学到太多!
获取
Expresso [ ^ ]-它是免费的,它可以检查并生成正则表达式.
We don''t do homework! But...
That is pretty easy: look at using the ''|'' operator to capture separate groups.

First capture the filename as a named group, then capture the file extension as a separate group, with specific text strings, separated by ''|'' characters.

It''s hard to give you any more, without just giving you the solution, and you won''t learn as much if I do that!
Get a copy of Expresso [^] - it''s free, and it examines and generates Regular expressions.


这篇关于学习正则表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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