September 10, 2008

Finding Overlapping Matches Using Perl's Lookahead Assertion Matching On Linux and Unix

Here's another topic that relates to our larger series on
number pools and guaranteed combinations within fixed lists while still being worthy of having its own post. Regular expression matching with Perl for Linux or Unix is fairly simple at its most basic (as are most implementations of regular expression matching). Taken to its most remedial level, you can use a regular expression as a poor man's "grep" (and, oddly enough, the "re" in grep actually stands for regular expression). Although this use of regular expression pattern matching does have its place, it doesn't really merit use outside of tools designed to apply it in that manner and will suck all the joy right out of creating your own regular expressions. In many instances, a well thought-out regular expression can convince most non-technical people in the room that you're a computer genius who's brain possesses more synapses, forming more bridges and firing more rapidly than anyone's ever should. If you show someone something like "/word/" they're far less likely to be impressed ( unless they consider putting letters in between delimiters a Herculean challenge ;)

Link: linuxshellaccount.blogspot.com

Category:

  • Linux
Click Here!