S.Gia
S.Gia

Reputation: 336

Notepad++ replace n characters in a certain pattern

In Notepad++ version 6.7.8.2, I would like to replace the string

<p class=question><b>nn.</b> 

where nn is any charachter 1-20000. (followed by a .)

I've tried expressions, etc. but can't get it to work.

Any help is appreciated.

Sorry forgot to show what I've tried so far:

<p class=question><b>[\..]</b>       

Upvotes: 1

Views: 576

Answers (2)

Jota
Jota

Reputation: 17611

Try this regular expression:

Find what: <p class=question><b>\b([1-9]|[1-9][0-9]{1,3}|1[0-9]{4}|20000)\b\.</b>

Replace with: Something Else

\b([1-9]|[1-9][0-9]{1,3}|1[0-9]{4}|20000)\b should match the range from 1 to 20000.

Upvotes: 1

AdrianEddy
AdrianEddy

Reputation: 717

Try regular expression:

<p class=question><b>([0-9]+)\.</b> 

Replace for example with:

Question \1:

Upvotes: 0

Related Questions