All Questions
29 questions
0
votes
2
answers
998
views
Use PCRE2 Regex to group phrase before colon AND group comma separated values
I have what seems to be a simple task but isn't working for me. Using only PCRE2 Regex (nothing else), I am trying to collect a phrase before the first colon at the beginning of a line, then separate ...
2
votes
1
answer
2k
views
Use REGEX only to group multiple key value pairs on line with anchoring text?
TL;DR: How can I grab a series of key:value pairs that are comma separated, but only if they start with specific strings?
Hello,
I have a situation where I have a block of text with multiple lines, ...
1
vote
1
answer
578
views
Using REGEX only, copy last (delimited) word to every comma separated value?
I have a series of lines with arbitrary number of comma separated values, and then a hash marked comment. The challenge is, using only PCRE2 regex for use in PERL, to do the following:
Store the ...
0
votes
1
answer
2k
views
Regex first column header csv
What would the regex be for matching the first column header in a csv file?
id,field1,field2
1,n/a,n/a
2,n/a,n/a
...
I just safely want to match id
0
votes
1
answer
586
views
How to remove lines if they appear more than once in Notepad++? (removing both lines!)
Here's how my .csv looks :
36;Masashi MOTOYAMA
38;H. SOGAHATA
38;Hitoshi SOGAHATA
47;Masami IHARA
52;S. ONO
52;S. ONO
For my project, I need to add one by one every missing id.
I want to keep the ids ...
0
votes
1
answer
286
views
Regex on Excel or similar solution?
I have an excel sheet I need to sanitise. I have over 1000 addresses and for some random reason, the data sent over by the supplier has random 16 digits at the start of the street address
Not all of ...
0
votes
0
answers
263
views
Extracting Text from HTML Files
In Windows, how would I go about parsing a folder full of HTML files and extracting all the strings between a particular tag pair?
Ideally, this would all go into a CSV file, with one field for the ...
0
votes
2
answers
2k
views
Notepad ++ regex: replace one or more text-value semicolon(s) with a dash, when semicolon is the field delimiter
I am struggling a little bit.
The file I need to manipulate is a csv with semicolon as field delimiter.
In some datasets a comment was added which INCLUDES a semicolon. Luckily these comments begin ...
1
vote
1
answer
233
views
Sublime is crashing because of huge csv file while editing content using regex
I have almost 1GB csv file and need to edit that file with using regex and have to do find and replace on sublime with regex \=\\\" for finding and =' for replacing.
I can do it from spiting csv file ...
1
vote
1
answer
2k
views
Regex in Notepad++ to find lines without exactly 9 pipes
I have a CSV that I need to clean up before reading it into a table. It is a pipe-delimted, 10-column structure. The challenge is, in some records, the 9th column has carriage returns. I need to ...
1
vote
2
answers
16k
views
how to make comma separated list into proper CSV format
I have a comma separated list of email adresses for example
"[email protected], [email protected], [email protected]"
But I would need to convert it to proper CSV format.
So replacing the ...
1
vote
1
answer
168
views
Deleting all line breaks between two matching variables in notepad++
So I am trying to ultimately make a table out of a whole bunch of text, but it's giving me a headache. Basically here is an idea of what is going on:
matchingvariablelengthupccode1 ...
1
vote
1
answer
4k
views
In Notepad++, how to Replace Text between two delimiter across multiple lines
A comma-delimited file is created when exporting google contacts into what they term "Google CSV format (for importing into a Google account)".
The issue is this format handles notes on multiple lines ...
2
votes
1
answer
6k
views
remove the last column from a comma delimited file
How do I remove the last column from a comma delimited file in notepad++ using regex with replace and find?
This is my file:
2010-09-02,148.67,31.34,0,0,31.34
2010-09-03,149.52,31.24,0,0,31.24
...
...
1
vote
1
answer
519
views
Replace returns wrong capturing group
I have a text file that looks something like this:
,'','a','bc','def','ghi','lmn','op','qr','stu'
I'm trying to replace groups of 5 with the match and a line break for easy readability. So, I'm ...
3
votes
1
answer
4k
views
Regex to find commas, excluding commas inside a string demarcated by double quotes
I would like to manipulate a closed .csv file without opening it through a button on an Excel AddIn. I am able to complete all the steps but am having a problem with finding a regex that would ...
1
vote
1
answer
258
views
Generate CSV from NS Zone File
I have a large file that contains records in multilines.
ex:
domain1 NS ns1
domain1 NS ns2
domain1 NS ns3
domain2 NS dnsx
What might be the fastest way to generate a CSV of the form
domain1,ns1,ns2,...
0
votes
1
answer
1k
views
Transforming CSV into SQL with Notepad++
Suppose I have a CSV file like this:
1,"abc",,,,
2,"def",,,"ghi",
3,,"jkl",,,"mno"
Now I need to transform it in 3 steps:
Replace all empty spaces with the String NULL
Add at the beginning of each ...
2
votes
2
answers
332
views
Delete everything in second column not in parentheses
I have a file that looks like this:
gene ID protein
Solyc06g062540 (Z) PYROPHOSPHATASE 3 (PTHR20889:SF0)
Solyc10g075050 ALBUMIN SUPERFAMILY (PTHR33076:SF11)
Solyc07g061760 ...
0
votes
2
answers
332
views
Change number in last row in data seperated with commas in NotePad++
I have rows of data all separated with commas. How can I replace the last numbers after the last commas with the number 5 in NotePad++?
For example: How do I replace 9, 17 and 124 with 5 in the below ...
2
votes
2
answers
4k
views
Notepad++ Regex Help in cleaning up file
I've got a csv file (the column separator is "<;>" ,the text delimiter is the double quote and the row separator "crlf") of more than 18000 lines.
However,many of the data contained within the ...
1
vote
2
answers
867
views
How to import this data set into excel? (column headings on each row delimited by a colon)
I'm trying to import the following data set into Excel. I've had no luck with the text import wizard. I'd like Excel to make id, name, street, etc the column names and insert each record onto a new ...
5
votes
4
answers
6k
views
regex help - ignore a char if it's in quotes
We have a web-based app at work where you can enter a regex into a search box and it returns the matches from a database
Here's a sample of what the database entries might look like. They're comma ...
15
votes
8
answers
26k
views
Notepad++ - Removing the first column in a comma separated file
I have a large CSV file that I need to remove the first column of data. I cannot open it in Excel because Excel converts some of the values in the columns to scientific numbers.
I am using Notepad++, ...
0
votes
4
answers
6k
views
RegEx to Remove CRLF from CSV export from Excel
I exported an Excel File to CSV and do have a lot of multi-lines within.
I marked the beginning of each line with *** and the end with ###.
*** some
text within
my cell to
export ###
Could someone ...
1
vote
1
answer
203
views
Regex to join fields in a CSV
I have a CSV with over 2 million records in it with the following format.
path;name;extension;size;date;user
/foo/;difacs;cgi;3,795;18-07-2011;Unix User\pads
/foo/;difacs.cgi;bak;2,622;03-12-...
0
votes
1
answer
519
views
Linux replace ^M$ with $ in csv
I'm working on migrating from MDaemon to Google Apps. As part of this process I'm exporting the contacts and calendars for all of our users into CSV files then reading them into a perl script and ...
1
vote
2
answers
7k
views
Notepad++/Regular Expression to find line with same beginning, different ending
So, I've read a bit and found NotePad++ doesn't use "normal" regex (starting to think I'll just go back to SciTE), but here's my question:
I've got an exported list of data with some redundant data ...
1
vote
1
answer
93
views
regex for searching a word in a word
i have a csv file which i need to filter mails marked with the word 'spam'
lines look like this
email;text;somestatus;mailserver status response; response message
[email protected];mx.mail.com;2;...