jellyfin-web/dashboard-ui/bower_components/prism/tests/languages/ruby/regex_feature.test
2016-02-03 18:00:01 -05:00

45 lines
1.1 KiB
Plaintext

/[foo]\/bar/gim
/[bar]/,
/./i;
%r!foo?bar#{39+3}!
%r(foo?bar#{39+3})
%r{foo?bar#{39+3}}
%r[foo?bar#{39+3}]
%r<foo?bar#{39+3}>
----------------------------------------------------
[
["regex", "/[foo]\\/bar/gim"],
["regex", "/[bar]/"], ["punctuation", ","],
["regex", "/./i"], ["punctuation", ";"],
["regex", ["%r!foo?bar", ["interpolation", [
["delimiter", "#{"],
["number", "39"], ["operator", "+"], ["number", "3"],
["delimiter", "}"]
]], "!"]],
["regex", ["%r(foo?bar", ["interpolation", [
["delimiter", "#{"],
["number", "39"], ["operator", "+"], ["number", "3"],
["delimiter", "}"]
]], ")"]],
["regex", ["%r{foo?bar", ["interpolation", [
["delimiter", "#{"],
["number", "39"], ["operator", "+"], ["number", "3"],
["delimiter", "}"]
]], "}"]],
["regex", ["%r[foo?bar", ["interpolation", [
["delimiter", "#{"],
["number", "39"], ["operator", "+"], ["number", "3"],
["delimiter", "}"]
]], "]"]],
["regex", ["%r<foo?bar", ["interpolation", [
["delimiter", "#{"],
["number", "39"], ["operator", "+"], ["number", "3"],
["delimiter", "}"]
]], ">"]]
]
----------------------------------------------------
Checks for regex.