RegexParserHelper

HtmlRenderer.Parse

Collection of regular expressions used when parsing

Métodos

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

Retorna: 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

Retorna: the regex instance

Match(string, string) : MatchCollection

Extracts matches from the specified source

regex
Regular expression to extract matches
source
Source to extract matches

Retorna: Collection of matches

Search(string, string, int) : string

Searches the specified regex on the source

regex
source
position
Search(string, string) : string

Searches the specified regex on the source

regex
source

Campos

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

CssColors : string

Extracts CSS colors; e.g. black white #fff #fe98cd rgb(5,5,5) rgb(45%, 0, 0)

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...

CssLength : string

Extracts CSS lengths; e.g. 9px 3pt .89em

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 {

CssNumber : string

Extracts a number; e.g. 5, 6, 7.5, 0.9

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"

HtmlTag : string

Extracts HTML tags

_regexes : Dictionary<string, Regex>

the regexes cache that is used by the parser so not to create regex each time