Perl-Sensitive Sunglasses | |
PerlMonks |
Re^2: Possible to have regexes act on file directly (not in memory)by Nocturnus (Beadle) |
on May 05, 2014 at 06:28 UTC ( [id://1085002]=note: print w/replies, xml ) | Need Help?? |
When mentioning the start tags and end tags, I was just giving an example to illustrate the problem at theoretical level. In this example, I wouldn't be allowed to make assumptions even on the size of the tags. In reality, anyways, the patterns are different from what I mentioned in the example. They are more complicated, but I will undoubtedly be able to write a state machine based mini-parser to solve the problem. This approach will make porting the respective application to other programming languages much easier; the disadvantage is that I will have to change the software if I am given other or further patterns to search for (right now, I don't have the time and interest for writing my own parser for some general search pattern language, so I will hard-code a search algorithm for each pattern into my mini-parser). Being able to run regexes directly on the source files would just have been a way which is by far more comfortable, faster (in the sense of "When is the software ready?") and general and which would allow for new search patterns without changing the software. Thank you very much, Nocturnus
In Section
Seekers of Perl Wisdom
|
|