eddie skywalker
eddie skywalker

Reputation: 189

RegEx with notepad++

100. 
101. 
102. 

guys this is my text and i want to change like this:

<tag>100.</tag>   
<tag>101.</tag>   
<tag>102.</tag>

My RegEx is:

[0-9][0-9][0-9]\.

Replace with:

<tag>\1</tag>

But it does not work :( I could not see the numbers and dot sign.

Thanks in advance

Upvotes: 1

Views: 132

Answers (2)

Nick Fury
Nick Fury

Reputation: 1313

You're missing the \. in your brackets. Try this $regex = ":[\d\.]+:".

Upvotes: 0

Alex K.
Alex K.

Reputation: 175956

You need some (capturing) parentheses;

Re: (\d{3}\.) Replace <tag>\1</tag>

Upvotes: 5

Related Questions