Re: Regex for properly formed names
| От | Steve Midgley |
|---|---|
| Тема | Re: Regex for properly formed names |
| Дата | |
| Msg-id | CAJexoSJ7NuY2aJd2Hc+N3q2KEgPimu6hJwLD0-reRSAZks4xuA@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Regex for properly formed names (Metin Ulusinan <metin.ulusinan@ssicilian.net>) |
| Список | pgsql-sql |
On Mon, Oct 11, 2021, 6:15 AM Metin Ulusinan <metin.ulusinan@ssicilian.net> wrote:
If regex is not necessary;INITCAP(bus_stop_name) != bus_stop_namecan be answer? 😎On Mon, Oct 11, 2021 at 4:01 PM Shaozhong SHI <shishaozhong@gmail.com> wrote:Hello,What is the regex for properly formed names?Scenario,Bus Stop (St Peter's Church)Scenario - wrongly formed nameBus stop (st peter's church)How to write a regex to detect wrongly formed names?Regards,David
If the regex definition is a space followed by a lower case letter or a lower case letter at the start of the string, I haven't tested this (on my phone) but /(^[a-z])|(\s[a-z])/
Some regex flavors don't like | as 'or' so you'd want to figure that out.. I'm not sure about postgres.
Steve
В списке pgsql-sql по дате отправления: