[Tutor] Regex's and "best practice"
Carl D Cravens
raven at phoenyx.net
Sun Nov 23 13:43:11 EST 2003
On Sat, 22 Nov 2003, Lloyd Kvam wrote:
> I would call it a fair solution. Perl is very hard to beat on the regex
> front simply because regular expressions are in the language, not a module.
It seems that they could be a bit less clunky. It's counter-intuitive
that match() and search() allow including flags, but to use flags with
sub() you have to compile() the regex first.
Just something I'll have to get used to.
> For a sysadmin, I think the win with python is the ease of writing reusable
> modules that are tailored for your system. I presumme you understand Python's
> if __name__ == '__main__':
I've only been doing this for a few days, so I haven't run across this.
Sounds useful, though, and I'll keep it in mind.
Carl D Cravens (raven at phoenyx.net)
Toto, I don't think we're online anymore...
More information about the Tutor