qr-operator Questions

3

Is there an easy way to add regex modifiers such as 'i' to a quoted regular expression? For example: $pat = qr/F(o+)B(a+)r/; $newpat = $pat . 'i'; # This doesn't work The only way I can think of...
Snag asked 10/11, 2011 at 16:15

3

Solved

This has been working for me in 5.8 and 5.10, but in 5.12 my code creates this weird non-qr object: # running "print Dumper($regex)" $VAR1 = bless( do{\(my $o = '')}, 'Regexp' ); Whereas printin...
Newbill asked 21/4, 2010 at 18:16

2

Solved

I'm writing a tiny program that takes user input using Getops, and based on it, the program will either try to match a pattern against some text, or substitute text for what matched. The problem ...
Seften asked 3/8, 2009 at 17:49

3

Solved

I'm having a hard time determining what characters must be escaped when using Perl's qr{} construct I'm attempting to create a multi-line precompiled regex for text that contains a myriad of norma...
Thyme asked 14/11, 2008 at 19:50
1

© 2022 - 2024 — McMap. All rights reserved.