On Sun, Jan 17, 2016 at 3:03 PM, Moritz Lenz <[email protected]> wrote:
> On 01/17/2016 06:07 PM, Tom Browder wrote:
...
>> # regex of dirs to ignore
>> my regex dirs {
>> \/home\/user\/\.cpan |
>> \/home\/tbrowde\/\.emacs
>> }
>
> Better written as
>
> my regex dirs {
> | '/home/user/.cpan'
> | '/home/tbowde/.emacs'
> }
>
> Yes, quoting does now work in regexes too. Cool, right? :-)
Yes, very cool! I have decided to use that format and it does ease
adding or modifying entries.
My final regex looks like this (shortened to only a couple of entries):
my regex dirs {
^
\s*
[ # <= non-capture grouping
| '/home/user/.cpan'
| '/home/tbowde/.emacs'
# more entries...
]
}
used like this:
next LINE if $line ~~ /<dirs>/;
Thanks, Moritz!
Best,
-Tom