As far as I have understood, pos won't help because it works in conjunction with regular expressions, and (as this thread has shown clearly enough), this always means loading to memory which is not an option in my case. Please correct me if I am wrong.

While I appreciate any help and while I would like to thank you explicitly for taking the time, I can't resist commenting on the XY problem:

I am not one of the guys who try to let others work for them. I will never shout "Hi everybody, I have problem X, please find as many solutions as possible to that problem for me". Instead, I am trying to work out a set of possible solutions, in this case writing my own parser which acts directly on the files being one of these and trying to use regular expressions which directly operate on the files being a second one.

Since I know how to do the former, and since I didn't know how to do the latter or even if the latter is feasible at all, I just asked for the latter one.

By full intent, I do not want others to solve my problems; instead, I am aware that the others' time is a precious resource and thus try to only ask the things I don't know and couldn't research myself after having put great efforts on it. IMHO, this is not only perfectly acceptable, but I honestly think that more people should act in this manner.

Furthermore, at philosophical level, the solution to every problem is to not want to solve it. Thus, if I had given you the "root" problem, what would prevent you from saying: "Hey, this again is an example for people asking for Y when they mean X. You really don't need to solve that problem. Search for other customers or go to holidays with your family."?

Finally, my question was clear, precise and specific; I think I even wouldn't have needed to give the example to understand the problem. As the others' contributions have shown, they have understood the essence of the problem very well, and I think that most of them did so as soon as having read the headline. People who don't understand the problem at theoretical or example level won't be able to help at all.

Looking into a problem at theoretical or example level does not have anything to do with speculation.

Thanks again,

Nocturnus


In reply to Re^4: Possible to have regexes act on file directly (not in memory) by Nocturnus
in thread Possible to have regexes act on file directly (not in memory) by Nocturnus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.