javascript - Regex match certain kind of paragraph -
i have string
1 example 2 example 3 example
where each line separated new line. trying find way match there has more 1 line, , each line must contain number followed string. there has @ least 2 lines.
this have far not working.
(\d* \w*(\n|$)){2,}
something work you:
string.match(/\d+ \w+[\n\r]+\d+ \w+/m);
note 'm' specifies it's okay match across multiple lines.
edit looks expression fine, missing "m".
Comments
Post a Comment