4
votes
1answer
269 views

Simplest setup on Windows to send HTTP request, get and apply regex to response, and write match(es) to output file

I'd like to write a script that records the size of the close votes review queue on SO (currently ~95.5k), polling just a few times an hour, so I could plot a general trend. I know what I'm going to ...
1
vote
0answers
40 views

Script to port specifc data from doc1 (notepad++) to specific place(s) in doc2

I really appreciate your help with a windows script or regex function that ports specific data from doc1 (xml in notepad++) to specific place(s) in doc2 (notepad++). I'm running win8. Thank you in ...
2
votes
1answer
91 views

using grep -E with AND conditions (ex: (?=/fo)^(?=/mo))

I have little problem figuring out how to get a list of files that has: string "/fo" in it But does not have string "/mo" I'm trying to figure out that in folder with lot of text files... My ...
1
vote
1answer
30 views

Looking for a command that will return the proc, func, etc that uses another proc, func, etc

Grep-ing for a function name to see where it's being used returns a list of rows and row numbers. Is there a smart way of using grep and awk to get the name of the calling procedure instead? Thanks
0
votes
2answers
4k views

RegEx find and replace with sed, matching group and replacing on condition

Is this possible with sed? I'm actually in iTunes using "Track Name Edit with sed" from Doug's Scripts, and I have a collection of tracks that are titled in one of two ways: Identical string - ...
3
votes
2answers
446 views

sed: Replace an unknown number of patterns on the same line

I'm trying to use sed to search for a certain 'primary' pattern that may exist on several lines, with each primary pattern followed by an --unknown-- number of 'secondary' patterns. The lines ...
2
votes
3answers
212 views

How to capture the result of a regex-powered command in Vim normal mode?

I want to find the number of times 'x' is present in my file, so I submit %s/x//gn and get the correct answer. How can I capture the resultant count into a variable using vimscript on the ...
1
vote
2answers
413 views

Fast regular expression that checks the number of times a character appears on a line in Vim?

Suppose I have a pipe-delimited text file. I suspect that one of the columns might have an embedded pipe character ('|'). I know there are 8 columns in the file, and each row should have 8-1 = 7 pipe ...