More about using regular expression in notepad++

/*by Jiangong SUN*/

I've written a blog in introducing regular expressions in notepad++, but it's kind of simple.SEE


You can type "Ctrl + r" at the same time for advanced use in notepad++. 




There are some clues in the "select regex" section. 

Match any character: .
Tag region start: (
Tag region end: )
Word start: \<
Word end: \>
Character literal: \
Set of characters: []
Complementary set: [^]
Line start: ^
Line end: $
Match 0+ times: *
Match 1+ times: +
Replace tag region: \1


Firstly, OR operator "|" does not work in notepad++ 


Example 1: Search for a word starting by "Rrdi" and a random alpahbet.
\<Rrdi[a-z]




Example 2: Search for a line ends by "]"

\]$




Example 3: Search for a word starting by a random alphabet, following any character and ending by "]"
\<[a-z]*]




Example 4: Search for a line starting by "/" and following a lot number of "*"
^/[*]*




Example 5: Search for a time format string like "12:03:45"
[0-9]+:[0-9]+:[0-9]+ match at least 1 time
or 
[0-9]*:[0-9]*:[0-9]* match at least 0 time





I'm trying to use ultraedit cause there is a lot of people recommend it.


LOL, enjoy coding !

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值