Script Regex, para el uso de expresiones regulares en Perl |
||
Este es el script Regex, que durante años hemos usado en
clases para enseñar a aplicar expresiones regulares en Perl. Se trata de un script muy sencillo que abre un archivo de texto e imprime líneas o segmentos en función de una expresión regular proporcionada por el usuario. Es básicamente como un
grep, pero más fácil de adaptar a diversas situaciones.
Por el momento el script viene en dos versiones:
Una versión ultrasimple:
y una versión semiadecentada:
Quienes usan por primera vez este tipo de herramientas probablemente van a
preferir la primera. Pero apenas se gane un poco
de experiencia es recomendable pasar a la segunda. La única diferencia
es que la segunda versión utiliza el
strict pragma, que hace el código más seguro.
|
At the moment the script comes in two versions:
An ultra-simple version:
http://www.tecling.com/scriptregex/scriptregex.zip
and a semi-decent version:
http://www.tecling.com/scriptregex/scriptregex-semi-decent-version.zip
If it is your first time with this kind of things, it is better to opt for the first one. But as soon as you gain some experience, it is highly recommended to move on to the second one. The only difference between the two is that the latter uses the
strict pragma, which makes the code safer.
If you have any questions, you are encouraged to send email to
rogelio dot nazar at pucv dot cl