javascript - Regex from jQuery source -


i understand of regex not | @ end of each parenthesis. know can used (a(b|c)). match both ab , ac. if in [] match actual symbol "|". me understand this.

// used matching numbers core_pnum = /[+-]?(?:\d*\.|)\d+(?:[ee][+-]?\d+|)/.source 

(?:\d*\.|) means

a non-capture group contains 0 or more digits followed dot or nothing @ all.

it rewritten like:

(?:\d*\.)? 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -