| Class | Regexp |
| In: |
EFL_regexp.rb
|
| Parent: | Object |
Copyright © 2007 by Ruben Heradio Gil, Jose Antonio Cerrada Somolinos, Jose Ramon Coz Fernandez and Jose Carlos Lopez Ruiz. This file is part of EFL-A Ruby implementation of the Exemplar Flexibilization Language. EFL is distributed under the terms of the GNU Lesser General Public License (LGPL). EFL is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. EFL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <www.gnu.org/licenses/>. Contact Information: Ruben Heradio Gil (rheradio@issi.uned.es). Phone number: 00 34 91 398 8242, Postal address: Dpto. de Ingeniería de SW y Sistemas Informáticos. E.T.S.I. Informática, UNED. C/ Juan del Rosal, 16. 28040 Madrid.
The next operators are included:
Using the "minus operator", regular expressions can be refined by deleting specific patterns. For example, let suppose we have the text: text_1, text_2, text_3, text_4.
The matching of the regular expression /text_[0-9]/ is [‘text_1’, ‘text_2’, ‘text_3’, ‘text_4’].
Applying the - operator: /text_[0-9]/ - /text_1/ - /text_3/, the matching will be refined to [‘text_2’, ‘text_4’].
Note that:
Using the "zoom operator", regular expressions can be chained to specify progressively a text pattern.
For example: regular_expression_1 > regular_expression_2 > regular_expression_3 > … regular_expression_N
runs the regular_expression_2 over the selection made by the regular_expression_1,
the regular_expression_3 over the selection made by the regular_expression_2, etcetera