private static function Inline::getTimestampRegex in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/yaml/Inline.php \Symfony\Component\Yaml\Inline::getTimestampRegex()
Gets a regex that matches a YAML date.
Return value
string The regular expression
See also
http://www.yaml.org/spec/1.2/spec.html#id2761573
2 calls to Inline::getTimestampRegex()
- Inline::dump in vendor/
symfony/ yaml/ Inline.php - Dumps a given PHP variable to a YAML string.
- Inline::evaluateScalar in vendor/
symfony/ yaml/ Inline.php - Evaluates scalars and replaces magic values.
File
- vendor/
symfony/ yaml/ Inline.php, line 519
Class
- Inline
- Inline implements a YAML parser/dumper for the YAML inline syntax.
Namespace
Symfony\Component\YamlCode
private static function getTimestampRegex() {
return <<<EOF
~^
(?P<year>[0-9][0-9][0-9][0-9])
-(?P<month>[0-9][0-9]?)
-(?P<day>[0-9][0-9]?)
(?:(?:[Tt]|[ \t]+)
(?P<hour>[0-9][0-9]?)
:(?P<minute>[0-9][0-9])
:(?P<second>[0-9][0-9])
(?:\\.(?P<fraction>[0-9]*))?
(?:[ \t]*(?P<tz>Z|(?P<tz_sign>[-+])(?P<tz_hour>[0-9][0-9]?)
(?::(?P<tz_minute>[0-9][0-9]))?))?)?
\$~x
EOF;
}