On Tue, Nov 23, 2021 at 09:58:00AM +0000, Shaozhong SHI wrote: > Is there any regex for Word space Word space Word and more? It isn't very clear what you want to achieve. From the other mails in this thread I understand that your words start with an uppercase char and continue with lowercase chars. Is that right? You want exactly one space between words, or more than one? What is this "...and more"? Arbitrary repetitions? Which kind of regular expressions do you want to use? POSIX? If all the answers to the above are "yes", you might try something like "(?:[[:upper:]][[:lower:]]*[[:space:]]+)*[[:upper:]][[:lower:]]*" (Caveat: untested). This would match a single word or more than one word, separated by one or more spaces, where a word starts with one upper-case character and continues with zero or more lowercases. HTH - t
Attachment:
signature.asc
Description: PGP signature