Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I wish to encode regular expressions, so that I can convert it to JSON and store in Redis. Reading perdoc JSON::XS has given hope!
my %hash = ( Command => "show debug", Filter => [ qr(^-{1,}\|-{1,}$), qr(^$) ] );
Using JSON:XS to encode, requires a callback - which I'm sure someone has done once somewhere. Can someone give me a pointer to where I might find such a function?
Many thanks in anticipation
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Freezing a regular expression qr()
by choroba (Cardinal) on Sep 06, 2017 at 12:10 UTC | |
Re: Freezing a regular expression qr()
by Corion (Patriarch) on Sep 06, 2017 at 12:09 UTC | |
by karlgoethebier (Abbot) on Sep 07, 2017 at 10:00 UTC | |
by afoken (Chancellor) on Sep 08, 2017 at 06:40 UTC | |
by karlgoethebier (Abbot) on Sep 08, 2017 at 14:33 UTC |
Back to
Seekers of Perl Wisdom