RegEx in Notepad++ to find a wild character and replace the whole word -


i have test file number values below:

32405494 32405495 32405496 32407498 

using notepad++, trying achieve here search first 4 digits using regular expression , replace whole number g3e_stylerule_seq.nextval

i able find these values using 3240*. question is, how replace whole number g3e_stylerule_seq.nextval?

when click replace button, following output:

g3e_stylerule_seq.nextval5494 g3e_stylerule_seq.nextval5495 g3e_stylerule_seq.nextval5496 g3e_stylerule_seq.nextval7498 

however, expecting following:

g3e_stylerule_seq.nextval g3e_stylerule_seq.nextval g3e_stylerule_seq.nextval g3e_stylerule_seq.nextval 

any ideas achieve this? possible through notepad++? there other text editors can use achieve this?

use this:

3240.* 

. wildcard character in regex , * means previous character repeated 0 or more times (your current regex matches 324 , 0 appears 0 or more times).

3240.* therefore match 3240 , other following characters.

you might want add line anchor:

^3240.* 

so don't replace numbers having 3240 in middle too.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -