jellyfin-web/dashboard-ui/bower_components/prism/tests/languages/ruby/regex_feature.test

45 lines
1.1 KiB
Plaintext
Raw Normal View History

2016-02-03 16:00:01 -07:00
/[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.