Add delimiter - simple but not for begginer
-
Hello,
I spend few hours looking for an answer, but didn’t find the solution. The idea how regular expressions works is too blur for me at this moment.
I have a text like this : &&&&#&&Dublin1$$$$$#London2##$$$$Birmingham3$###
Similar strings in each line, few hundred lines. I wanted to get string like that: Dublin1,London2,Birmingham3 - letter and digit combinations with delimiter added.In n++ I pressed Ctrl+H, in find field give regular expression (and marked the option of regular expressions): [a-zA-Z0-9]{1,15}
But in the filed Replace I put many things from examples, like \1 etc. No result.Will be thankful for any help.
Best regards,
Alec -
I would try:
Find what:
\W+
Replace with:,Meaning find a run of one or more NON-word characters and replace them with a comma.
Word characters are [A-Za-z0-9_] so NON-word means everything else.
Note theWis capitalized; that’s key to NON-word. -
Thank you, looks so simple and elegant that makes me think where my “open minded” has gone.
Will try it.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login