Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

regex exec returns null

// When 'g' flag is set, regex remembers last search index. 
// Before next search need to reset it, otherwise search will return null

re.lastIndex=0;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #regex #exec #returns #null
ADD COMMENT
Topic
Name
4+4 =