https://wiki.liberty-eiffel.org/api.php?action=feedcontributions&user=80.170.7.104&feedformat=atomLiberty Eiffel Wiki - User contributions [en]2024-03-29T13:04:25ZUser contributionsMediaWiki 1.37.0https://wiki.liberty-eiffel.org/index.php?title=Lib/regular_expression&diff=722Lib/regular expression2005-11-28T13:16:41Z<p>80.170.7.104: </p>
<hr />
<div>== Regular expressions of SmartEiffel 2.2 ==<br />
<br />
Since SmartEiffel 2.2 a cluster is included that allow you to use either POSIX regular expressions or PERL5 regular expressions.<br />
<br />
Currently the regular expression cluster makes use of the backtracking cluster. <br />
<br />
The main restriction comes from used the character set. The used one is the ASCII character set. UNICODE characters are not supported currently.<br />
<br />
An other restriction is that most of the common character escapes are not made: \n is n not new line, \t is t not tab, etc.. The reason is that we supposed that such a preprocessing can be made by users and we had a schizophrenic conflict between %N and \n. Your opinion about that point is very wellcome.<br />
<br />
Known problems:<br />
* The constructs (a?b?)* gives an infinite loop and fills the stack until crash.<br />
* The construct (a+)+ can use so much CPU that you believe that it is buggy.<br />
* The construct (a(b)?)* applied on aba will give you a group 2 not empty, beginning at 2 and finishing at 2.<br />
<br />
As always, see the tutorial to learn how to use regular expressions.<br />
<br />
== The POSIX regular expressions ==<br />
<br />
The POSIX regular expression are supported except for the [=...=] construct (same class that ...).<br />
<br />
See POSIX 1003.2, section 2.8 (Regular Expression Notation). [http://www.unix.org/ www.unix.org]<br />
<br />
On LINUX: man 7 regex.<br />
<br />
== The PERL 5 regular expressions ==<br />
<br />
With the main restriction that UNICODE is not handled, most of the PERL 5 regular expressions is implemented.<br />
See [http://perldoc.perl.org/perlre.html Perl Regular expressions].<br />
<br />
Missing things:<br />
* The experimental behaviours are not integrated <br />
* Some construct like [[:] that are well interpreted by perl produce an error. In these cases, you must write [:[].<br />
<br />
Added things:<br />
* The look behind (negative or positive) is not restricted to have a fixed length.<br />
* The POSIX constructs [:<:] and [:>:] are allowed (it stands for begin and end of words).<br />
<br />
== Coming soon? ==<br />
<br />
* The shell (bash) file matching (help wanted)<br />
* The basic regular expression (help wanted)<br />
* The JAVA regular expressions (help wanted, trick inherit PERL5 builder and make the hungry repetition)</div>80.170.7.104https://wiki.liberty-eiffel.org/index.php?title=Lib/regular_expression&diff=721Lib/regular expression2005-11-28T13:15:29Z<p>80.170.7.104: </p>
<hr />
<div>== Regular expressions of SmartEiffel 2.2 ==<br />
<br />
Since SmartEiffel 2.2 a cluster is included that allow you to use either POSIX regular expressions or PERL5 regular expressions.<br />
<br />
Currently the regular expression cluster makes use of the backtracking cluster. <br />
<br />
The main restriction comes from used the character set. The used one is the ASCII character set. UNICODE characters are not supported currently.<br />
<br />
An other restriction is that most of the common character escapes are not made: \n is n not new line, \t is t not tab, etc.. The reason is that we supposed that such a preprocessing can be made by users and we had a schizophrenic conflict between %N and \n. Your opinion about that point is very wellcome.<br />
<br />
Known problems:<br />
* The constructs (a?b?)* gives an infinite loop and fills the stack until crash.<br />
* The construct (a+)+ can use so much CPU that you believe that it is buggy.<br />
* The construct (a(b)?)* applied on aba will give you a group 2 not empty, beginning at 2 and finishing at 2.<br />
<br />
== The POSIX regular expressions ==<br />
<br />
The POSIX regular expression are supported except for the [=...=] construct (same class that ...).<br />
<br />
See POSIX 1003.2, section 2.8 (Regular Expression Notation). [http://www.unix.org/ www.unix.org]<br />
<br />
On LINUX: man 7 regex.<br />
<br />
== The PERL 5 regular expressions ==<br />
<br />
With the main restriction that UNICODE is not handled, most of the PERL 5 regular expressions is implemented.<br />
See [http://perldoc.perl.org/perlre.html Perl Regular expressions].<br />
<br />
Missing things:<br />
* The experimental behaviours are not integrated <br />
* Some construct like [[:] that are well interpreted by perl produce an error. In these cases, you must write [:[].<br />
<br />
Added things:<br />
* The look behind (negative or positive) is not restricted to have a fixed length.<br />
* The POSIX constructs [:<:] and [:>:] are allowed (it stands for begin and end of words).<br />
<br />
== Coming soon? ==<br />
<br />
* The shell (bash) file matching (help wanted)<br />
* The basic regular expression (help wanted)<br />
* The JAVA regular expressions (help wanted, trick inherit PERL5 builder and make the hungry repetition)</div>80.170.7.104