Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have thousands of entries in Notepad++ (amongst other text mixed in), where I'm trying to remove the dash symbol in-between any 2 numbers.

I have data like this:

text text this is text here
234-5678
this is more text here 
123-4585 this is more text here
or text is here too 583-5974

Desired Results:

text text this is text here
2345678
this is more text here 
1234585 this is more text here
or text is here too 5835974

I've tried:

Find: [0-9]-[0-9] (which works to find the (#)(dash)(#)
Replace: $0, $1, 1, ^$0, "$0", etc.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
557 views
Welcome To Ask or Share your Answers For Others

1 Answer

Try this regex.

(?<=d)-(?=d)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...