view release on metacpan or search on metacpan
lib/App/Greple/jq.pm view on Meta::CPAN
}
qr{
^ (${level} $indent_re*) "$label_re": .* \n
(?:
## single line key-value pair
\g{-1} $indent_re $start_with .++ \n
|
## indented array/hash
\g{-1} $indent_re \S .* [\[\{] \n
(?: \g{-1} $indent_re \s .*+ \n) *+
\g{-1} $indent_re [\]\}] ,? \n
) *?
}xm;
}
};
push @prefix_re, $prefix_re if $prefix_re;
lib/App/Greple/jq.pm view on Meta::CPAN
$label =~ s/%/.*/g;
my($label_re, $pattern_re) = map re($_), $label, $pattern;
my $re = qr{
@prefix_re \K
^
(?(<level>) (?= \g{level} $indent_re \S ) ) # required level
(?<in> [ ]*) "$label_re": [ ]*+ # find given label
(?: . | \n\g{in} \s++ ) * # and look for ...
$pattern_re # pattern
(?: . | \n\g{in} (?: \s++ | [\]\}] ) ) * # and take the rest
}xm;
warn "$re\n" if $config{debug};
match_regions pattern => $re;
}
1;
__DATA__
define JSON-OBJECTS ^([ ]*)\{(?s:.*?)^\g{-1}\},?\n
option default --json-block --jq-filter
option --jq-filter --if='jq "if type == \"array\" then .[] else . end"'
view all matches for this distribution
view release on metacpan or search on metacpan
share/sccc2.dict view on Meta::CPAN
#
# C/C++ã»ãã¥ã¢ã³ã¼ãã£ã³ã° 第2ç
# https://www.jpcert.or.jp/securecoding_book_2nd.html
#
([ããããã¯ã«ãª])\g{-1} //
(?<!ã)ã®ã® //
(?:ã¸ã«|ã«ã¸) //
(ä¸|ã²ã¨)㤠// ã²ã¨ã¤
(è¿|ã¾ã§) // ã¾ã§
view all matches for this distribution
view release on metacpan or search on metacpan
it.
Order of capture group in the pattern is not guaranteed. Please avoid
to use direct index, and use relative or named capture group instead.
For example, if you want to search repeated characters, use
`(\w)\g{-1}` or `(?<c>\w)\g{c}` rather than
`(\w)\1`.
Extended Bracketed Character Classes (`(?[...])`) can be used without
warnings. See ["Extended Bracketed Character
Classes" in perlrecharclass](https://metacpan.org/pod/perlrecharclass#Extended-Bracketed-Character-Classes).
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/JobLog/TimeGrammar.pm view on Meta::CPAN
(?<us>
(\d{1,2}) (?{ $b1 = $^N })
((?÷r))
(\d{1,2}) (?{ $b2 = $^N })
\g{-2}
(\d{4})
(?{
$buffer{year} = $^N;
$buffer{month} = $b1;
$buffer{day} = $b2;
lib/App/JobLog/TimeGrammar.pm view on Meta::CPAN
(?<iso>
(\d{4}) (?{ $b1 = $^N })
((?÷r))
(\d{1,2}) (?{ $b2 = $^N })
\g{-2}
(\d{1,2})
(?{
$buffer{year} = $b1;
$buffer{month} = $b2;
$buffer{day} = $^N;
lib/App/JobLog/TimeGrammar.pm view on Meta::CPAN
: (?<minute>\d++)
(?:
: (?<second>\d++)
)?
)?
(?: \s*+ (?<suffix>[ap]) (\.?)m\g{-1})?
/ix;
my ( $hour, $minute, $second, $suffix ) =
( $+{hour}, $+{minute} || 0, $+{second} || 0, lc( $+{suffix} || 'x' ) );
$hour += 12 if $suffix eq 'p' && $hour < 12;
$suffix = 'p' if $hour > 11;
view all matches for this distribution
view release on metacpan or search on metacpan
t/app/rssfilter/match/abcpreviews.t view on Meta::CPAN
qr/too many arguments/,
'throws error when given more than one item to match'
);
ok(
App::Rssfilter::Match::AbcPreviews::match( Mojo::DOM->new( '<guid>I am a preview<\guid>' ) ),
'match item whose guid contains "preview"'
);
ok(
! App::Rssfilter::Match::AbcPreviews::match( Mojo::DOM->new( '<guid>I am a human being<\guid>' ) ),
'does not match item whose guid does not contain "preview"'
);
ok(
! App::Rssfilter::Match::AbcPreviews::match( Mojo::DOM->new( '<title>sneak peek preview season</title><guid>http://hoop.de.doo/sneak-preview</guid>' ) ),
view all matches for this distribution