private static function Inline::getTimestampRegex in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/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 modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ Yaml/ Inline.php - Dumps a given PHP variable to a YAML string.
- Inline::evaluateScalar in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ Yaml/ Inline.php - Evaluates scalars and replaces magic values.
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ 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;
}