Regex: how to match anything before and after uppercase sequences with a period as delimiter? -


i have series of sentences containing uppercase keywords in large text containing several other sentences. need match sentences contain uppercase words (1 or more), instance:

this sentence should matched. , 1 should too. other sentence should not matched. 

any suggestion? thanks! not advanced user...

this it:

^.*\b[a-z]+\b.*$ 
  • \b assert position @ word boundary
  • a-z single character in range between (index 65) , z

https://regex101.com/r/kun41w/1


if i not counted uppercase word in sentence matches conditions. use this:

^.*\b[a-z]{2,}\b.*$ 
  • {2,} quantifier — matches between 2 , unlimited times, many times possible, giving needed

Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -