I have a file with a some comma separated names and some comma separated account numbers.
Names will always be something like Dow, John
and numbers like 012394,19862
.
Using Notepad++'s "Regex Find" feature, I'd like to replace commas between numbers with pipes |
.
Basically :
turn: Dow,John into: Dow,John 12345,09876 12345|09876 13568,08642 13568|08642
I've been using [0-9],
to find the commas, but I can't get it to properly leave the number's last digit and replace just the comma.
Any ideas?
Using Regex to find and replace text in Notepad++ In all examples, use select Find and Replace (Ctrl + H) to replace all the matches with the desired string or (no string). And also ensure the 'Regular expression' radio button is set.
How to use RegEx with . replace in JavaScript. To use RegEx, the first argument of replace will be replaced with regex syntax, for example /regex/ . This syntax serves as a pattern where any parts of the string that match it will be replaced with the new substring.
Find/Replace with Regular Expression (Regex) or Wildcards. Word supports find/replace with it own variation of regular expressions (regex), which is called wildcards. To use regex: Ctrl-H (Find/Replace) ⇒ Check "Use wildcards" option under "More".
Search for ([0-9]),
and replace it with \1|
. Does that work?
use this regex
(\d),(\d)
and replace it with
$1|$2
OR
\1|\2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With