RegexParserHelper
Collection of regular expressions used when parsing
メソッド
GetCssAtRules(string, int) : string
Get CSS at rule from the given stylesheet.
- stylesheet
- the stylesheet data to retrieve the rule from
- startIdx
- the index to start the search for the rule, on return will be the value of the end of the found rule
戻り値: the found at rule or null if not exists
GetRegex(string) : Regex
Get regex instance for the given regex string.
- regex
- the regex string to use
戻り値: the regex instance
Match(string, string) : MatchCollection
Extracts matches from the specified source
- regex
- Regular expression to extract matches
- source
- Source to extract matches
戻り値: Collection of matches
フィールド
CssBlocks : string
Extracts defined blocks in CSS. WARNING: Blocks will include blocks inside at-rules.
CssBorderStyle : string
Extracts CSS border styles; e.g. solid none dotted
CssBorderWidth : string
Extracts CSS border widthe; e.g. 1px thin 3em
CssComments : string
Extracts CSS style comments; e.g. /* comment */
CssFontFamily : string
Extracts font-family values
CssFontSize : string
Exracts font sizes: xx-small, larger, small, 34pt, 30%, 2em
CssFontSizeAndLineHeight : string
Gets the font-size[/line-height]? on the font shorthand property. Check http://www.w3.org/TR/CSS21/fonts.html#font-shorthand
CssFontStyle : string
Extracts CSS font-styles; e.g. normal italic oblique
CssFontVariant : string
Extracts CSS font-variant values; e.g. normal, small-caps
CssFontWeight : string
Extracts font-weight values; e.g. normal, bold, bolder...
CssLineHeight : string
Extracts line-height values (normal, numbers, lengths, percentages)
CssMediaTypes : string
Extracts the media types from a media at-rule; e.g. @media print, 3d, screen {
CssPercentage : string
Extracts css percentages from the string; e.g. 100% .5% 5.4%
HmlTagAttributes : string
Extracts attributes from a HTML tag; e.g. att=value, att="value"
_regexes : Dictionary<string, Regex>
the regexes cache that is used by the parser so not to create regex each time