regex - Matching 3+ Title Case Word in a single pcre expression -



regex - Matching 3+ Title Case Word in a single pcre expression -

i looking single pcre (ver. 3.85) compatible regular look matches string composed of 3 or more title case words not match string containing words starting lower-case letter. e.g.:

"gaius julius caesar" should match "gaius caesar" should not match "gaius julius caesar rome" should match "gaius julius caesar" should not match

tried

(\b[a-z]\w+\b){3,}

with no success.

any hint?

try 1 of these:

(\b[a-z]\w+\b\s??){3,}

here demo

(\b[a-z]\w+\b)(\s+\b[a-z]\w+\b){2,}

here demo

regex pcregrep

Comments

Popular posts from this blog

php - How to pass multiple values from url -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

database - php search bar when I press submit with nothing in the search bar it shows all the data -