regexps

package module
v0.0.0-...-06c5514 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2020 License: MIT Imports: 1 Imported by: 0

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 DayOfMonthOrdinal = regexp.MustCompile(`\d{1,2}(th|st|nd|rd)`)

DayOfMonthOrdinal is used to match ordinal dates.

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 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 a one to four 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 a 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 MatchUnsigned = regexp.MustCompile(`\d+`)

MatchUnsigned is used to match unsigned digits.

View Source
var MonthsRegex = regexp.MustCompile(`(?i)(january|february|march|april|may|june|july|august|september|october|november|december|jan\.?|feb\.?|mar\.?|apr\.?|may\.?|jun\.?|jul\.?|aug\.?|sep\.?|oct\.?|nov\.?|dec\.?)`)

MonthsRegex is used to parse month names.

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

TimeZoneRegex is used to parse timezones.

View Source
var TokenRegex = regexp.MustCompile("(LT[S]?|LL?L?L?|l{1,4}|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|SS?S?|X|zz?|ZZ?|Q)")

TokenRegex is used to parse tokens out of formats.

View Source
var WeekdaysRegex = regexp.MustCompile(`(?i)(sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun\.?|mon\.?|tue\.?|wed\.?|thu\.?|fri\.?|sat\.?)`)

WeekdaysRegex is used to parse weekday names.

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