I want to do a logfile parser using ruby, this parser should parse the log file while it grows. It should parse line by line until the end and then wait (somehow?) for more lines to come, so my question is how to best handle it growing?
edit:
Would prefer a portable way of doing this, even though my logfile is on Windows (for the moment...
Does anyone know of a python implementation of RubyonRails UrlEncodedPairParser or
Rack::Utils.parse_nested_query?
I think I remember seeing a version in one of the python frameworks (not django) but can't seem to find it?
...
Is there a way to tell ifort or gfortran to just try to parse a source file (no include following, no compilation, no linking, etc) to tell us whether they find the syntax of the file acceptable / valid for a given Fortran version (77, 90, 95, ...) or at least valid at all?
I'm working on a piece of software that will parse and analyze ...
What I'm trying to do this is writing a simple parser for the following case in .NET
( [PART3]function1() AND [PART4]function7() ) OR [PART2]function90()
[PART] indicates the evaluation location, (assume that this is huge text file, PART separates text files into large chunks)
function() s are my documented function which can be call...
How do I convert the string:
"Microsoft Windows XP Professional x64 Edition|C:\\WINDOWS|\\Device\\Harddisk4\\Partition1"
to
"Microsoft Windows XP Professional x64 Edition"
...using regular expressions?
I want to cut out all after | symbol. Is it easy to realise it via Regex.Replace? Where could I found syntax description for Rege...
I'm creating a Brainf++k parser (in a BASIC dialect) ultimately to create an interpreter but i've realise it's not as straight forward as i first thought. My problem is that i need a way to accurately parse the matching loop operators within a Brainf++k program. This is an example program:
,>,>++++++++[<------<------>>-]
<<[>[>+>+<<-]>>...
Hi Guys,
I have never used log parser before..
well I am getting this error now.. i don't know the reason..
Retrieving the COM class factory for component with CLSID {8CFEBA94-3FC2-45CA-B9A5-9EDACF704F66} failed due to the following error: 80040154.
can ya help me out with this..
:)
...
i want to parse pdf file such that i can identify each article's title and its description.so that i can store title text and descriptiontext in cache for search purpose.is there any library or tool for this?
...
Hi,
I want to remove all images from a HTML page (actually tinymce user input) which do not meet certain criteria (class = "int" or class = "ext") and I'm struggeling with the correct approach. That's what I'm doing so far:
hbody = Hpricot(input)
@internal_images = hbody.search("//img[@class='int']")
@external_images = hbody.search("//...
Lets say you have strings of this format.
January 11th, "111"
November 1st, "1101"
October 13th, "1013"
etc.
So basically all you want to parse it and store in two variables date and month.
I do not need code for parsing, I can easily do that.
I was just wondering if someone knows the way to do it using something like
DateTime.TryPars...
I need to convert some strings, and pull out the two first integers e.g:
unkowntext60moreunknowntext25something
To:
@width = 60
@height = 25
If I do string.to_i, I get the first integer:, 60. I can't figure out how I get the second integer, 25. Any ideas?
...
I've got a fairly complex calculator that prints output when the user inputs ";" (and hits enter.) What I'm trying to do now is allow the user to print output when they hit enter, (without use of semicolon.) I need to know how I can implement this.
Side note: The calculator uses tokenization to read user input
This is part of the calcu...
In my new job more people are using Python than Perl, and I have a very useful API that I wrote myself and I'd like to make available to my co-workers in Python.
I thought that a compiler that compiled Perl code into Python code would be really useful for such a task. Before trying to write something that parsed Perl (or at least, the ...
OK guys/gals stuck again on something simple
I have a text file which has multiple lines per entry, the data is in the following format
firstword word word word
wordx word word word interesting1 word word word word
wordy word word word
wordz word word word interesting2 word word word lastword
this sequence repeats a hundred or so t...
I'm using match() in JavaScript to parse a dates from an RSS feed, I just can't get my head around the correct regular expression to find the date format.
Here's the date:
2009-05-11 16:59:20
And the regular expression so far:
if (dateToParse.match(/^\d\d\d\d-\d\d-\d\d/)) {
dateTimeSeparator = " ";
monthIndex = 0;
...
Html Agility Pack was given as the answer to a StackOverflow question some time ago, is it still the best option? What other options should be considered? Is there something more lightweight?
...
I'd like to scan a variables that form vectors from white space delimited text file and the stumbling block (all to often for me) is lack of elegance.
Currently my scanning code requires delineating the size of the vector as the first element in the file:
7 : 1 3 6 8 -9 .123 1.1
Which bothers me because the '7' could be determined by...
I'm going to try to explain the problem.
I am getting a string containing a registry key. For example:
HKEY_CURRENT_USER\Software\MyProgram\SomeOtherValue\SomeKey
now, I need to parse that string into 3 different char (or char *) variables. After the parsing it'll be something like:
string1 = HKEY_CURRENT_USER
string2 = \Software\My...
I'd like to use an API to parse US Postal addresses input into an ASP.NET application. I will store the input address, no matter how it's input, then attempt to parse and verify with the user.
Does Google, Microsoft or Yahoo have such functionality in their APIs? If so, what is your experience with the various APIs?
...
I have the following string with separate delimiters that needs to be parsed out and I am running into a bit of a wall at the moment.
example:
category 1---category 2;subgroup 1||subgroup 2---subgroup 1;value 1||value2---value 3
I wanted to re-arrange into the following grouping:
category 1;subgroup 1;value1;subgroup 2;value 2;catego...