From: Ludo Date: 2002-12-04T01:21:14+09:00 Subject: Re: Regular expression question --=-huM+us4d8V/8uyoNhVcz Content-Type: text/plain Content-Transfer-Encoding: 7bit I don't master regex ... but it seems you haven't to put a backslash before | On Tue, 2002-12-03 at 17:15, Roman Rytov wrote: > line !~ /\(^#\)\|\(^[\s\t]*$\)/ > > Is supposed to filter empty lines and lines commented by "#" symbol at > the beginning. > Separately the both patterns work but with "|" operation it doesn't > filter. What I missed? > > Roman Rytov -- Ludo ENIB/LI2 --=-huM+us4d8V/8uyoNhVcz Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit I don't master regex ... but it seems you haven't to put a backslash before |

On Tue, 2002-12-03 at 17:15, Roman Rytov wrote:
    line !~ /\(^#\)\|\(^[\s\t]*$\)/

Is supposed to filter empty lines and lines commented by "#" symbol at
the beginning.
Separately the both patterns work but with "|" operation it doesn't
filter. What I missed? 

Roman Rytov
--
Ludo <coquelle@enib.fr>
ENIB/LI2
--=-huM+us4d8V/8uyoNhVcz--