regexps

package
v1.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2022 License: MIT Imports: 1 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BasicISORegex = regexp.MustCompile(`^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$`)

BasicISORegex is used to parse simple ISO 8601 dates.

View Source
var BracketRegex = regexp.MustCompile(`\[([^\[\]]*)\]`)

BracketRegex is used to find brackets in formats.

View Source
var ChunkOffset = regexp.MustCompile(`(?i)([\+\-]|\d\d)`)

ChunkOffset is used to parse timezone offset.

View Source
var ExtendedISORegex = regexp.MustCompile(`^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$`)

ExtendedISORegex is used to parse extends ISO 8601 dates. 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)

View Source
var LocaleRegex = regexp.MustCompile(`(\[[^\[]*\])|(\\)?(LT[S]?|LL?L?L?|l{1,4})`)

LocaleRegex is used to parse locale specific formats out of tokens.

View Source
var MatchMeridiem = regexp.MustCompile(`(?i)(am|pm)`)

MatchMeridiem is used to match meridiem field.

View Source
var MatchOne = regexp.MustCompile(`\d`)

MatchOne is used to match a single digit.

View Source
var MatchOneToFour = regexp.MustCompile(`\d{1,4}`)

MatchOneToFour is used to match one to four digits.

View Source
var MatchOneToSix = regexp.MustCompile(`[+-]?\d{1,6}`)

MatchOneToSix is used to match one to 6 digits.

View Source
var MatchOneToThree = regexp.MustCompile(`\d{1,3}`)

MatchOneToThree is used to match one to three digits.

View Source
var MatchOneToTwo = regexp.MustCompile(`\d\d?`)

MatchOneToTwo is used to match one to two digits.

View Source
var MatchShortOffset = regexp.MustCompile(`(?i)(Z|[+-]\d\d(?::?\d\d)?)`)

MatchShortOffset is used to match short timezone offsets.

View Source
var MatchSigned = regexp.MustCompile(`[+-]?\d+`)

MatchSigned is used to match signed digits.

View Source
var MatchThree = regexp.MustCompile(`\d{3}`)

MatchThree is used to match exactly 3 digits.

View Source
var MatchTimestamp = regexp.MustCompile(`[+-]?\d+(\.\d{1,3})?`)

MatchTimestamp is used to match unix timestamps.

View Source
var MatchTwo = regexp.MustCompile(`\d\d`)

MatchTwo is used to match exactly 2 digits.

View Source
var MatchUnsigned = regexp.MustCompile(`\d+`)

MatchUnsigned is used to match unsigned digits.

View Source
var TimeZoneRegex = regexp.MustCompile(`Z|[+-]\d\d(?::?\d\d)?`)

TimeZoneRegex is used to parse timezones.

View Source
var TokenRegex = regexp.MustCompile(`(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|SS?S?|X|zz?zz?|ZZ?|.)`)

TokenRegex is used to parse tokens out of formats.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL