Re: Regex for Word space Word space Word ....

Поиск
Список
Период
Сортировка
Искать
От
Тема
Re: Regex for Word space Word space Word ....
Дата
Msg-id
YZzydgLNjRiEXmkX@tuxteam.de
Ответ на
Список
Дерево обсуждения
Regex for Word space Word space Word .... Shaozhong SHI <shishaozhong@gmail.com>
Re: Regex for Word space Word space Word .... Shaozhong SHI <shishaozhong@gmail.com>
Re: Regex for Word space Word space Word .... chlor <hans.schou@gmail.com>
Re: Regex for Word space Word space Word .... Shaozhong SHI <shishaozhong@gmail.com>
Re: Regex for Word space Word space Word .... Saurabh Agrawal <mail@saurabhagrawal.net>
Re: Regex for Word space Word space Word .... Andreas Joseph Krogh <andreas@visena.com>
Re: Regex for Word space Word space Word .... "David G. Johnston" <david.g.johnston@gmail.com>
Re: Regex for Word space Word space Word .... Shaozhong SHI <shishaozhong@gmail.com>
Re: Regex for Word space Word space Word .... <tomas@tuxteam.de>
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
В списке pgsql-general по дате отправления
От: Дмитрий Иванов
Дата:
От: tomas@tuxteam.de
Дата:
FAQ