All Questions
15 questions
4
votes
1
answer
150
views
Generate CSV from multiple files on Regex Python Output
I have written a Python script using regex to extrapolate a poorly formatted text file data table into an actual data table. I am currently printing the output using ...
1
vote
2
answers
433
views
Powershell function to search CSV logs for certain regexes
I have a parser that goes through two different logs, both .csv files, and checks for certain lines based off the regex code that I have chosen.
This parser works fine, it just takes about a minute ...
2
votes
1
answer
8k
views
Performing a regex search and saving results to CSV
I am a Python beginner, and I wrote a simple Python program, which does the following:
search the pattern in the lines of a file (contains messages)
pick the information from the lines and save it to ...
5
votes
1
answer
2k
views
Improving CSV filtering with Python using regex
Consider a .csv file that contains a set of video names like so:
...
3
votes
2
answers
789
views
Optimize a simple and quick python script for transposing a .csv file
I need to transpose the following file output1.csv, which is is a result from a quantum chemistry calculation into a single colum efficiently:
...
0
votes
1
answer
86
views
Replacing address details in colon delimited string
I'm sanitising personal data in a large database with a series of Regular Expressions. In many cases the sensitive data is in a colon-delimited field within a CSV file.
Here is a sample:
...
8
votes
1
answer
2k
views
RFC 4180-compliant CSV parser in Java
While looking at a recent question, I realized that there is no CSV parser in the standard Java library. I decided to write one that complies with RFC 4180. Highlights of the standard include:
...
5
votes
1
answer
5k
views
Extracting emails from a file and writing them to another file
The code below works fine for me. Is there any way that I can improve this code more? Note: delimiter is single whitespace only for email address.
getmail.py
...
3
votes
3
answers
10k
views
Inserting persons in file into SQLite
I've just started working with SQLite in C# to test various features of an application. In building my first SQLite example I wanted to insert a large .csv into a table (Person) with two columns, A ...
6
votes
3
answers
140
views
Some simple Perl and Regex
Reads from a flat file of three columns, delimited by at least one tab character. Filters the three columns based on input; returns list of corresponding emails. Arguments passed like ...
2
votes
2
answers
1k
views
Speeding up and fixing phone numbers from CSVs with Regex
I've hodgepodged together an attempt to extract all phone numbers from all CSVs in a directory, regardless of where they are and what format they're in. I want all phone numbers to be printed to a ...
6
votes
1
answer
4k
views
Calculate query coverage from BLAST output
I have a BLAST output file and want to calculate query coverage, appending the query lengths as an additional column to the output. Let's say I have
2 7 15
<...
22
votes
4
answers
10k
views
Regex to parse semicolon-delimited fields is too slow
I have a file with just 3500 lines like these:
filecontent= "13P397;Fotostuff;t;IBM;IBM lalala 123|IBM lalala 1234;28.000 things;;IBMlalala123|IBMlalala1234"
...
1
vote
2
answers
124
views
Grabbing city names and numbers from a CSV file
I've got information that is imported from a CSV file that my site grabs every day with PHP. I'm just learning RegEx so I'm able to do what I need to do but am looking to get more efficient with my ...
4
votes
4
answers
285
views
Managing a CSV of users and permissions
I've got a CSV that contains users and permissions in the below format, where users can have as little as one or as many as eight different permissions:
...