Search Postgresql Archives

Re: Regex for (A) and (B) to find in Bus Stop (A) or (B)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, November 3, 2021, David G. Johnston <david.g.johnston@xxxxxxxxx> wrote:
On Wednesday, November 3, 2021, Shaozhong SHI <shishaozhong@xxxxxxxxx> wrote:
What is the regex for (A) and (B) to find in Bus Stop (A) or (B)?

Not tested…

^Bus\sStop\s\((\w)\)\sor\((\w)\)$ 

The \s can just written as a space though the above seems clearer in email (though it allows for non-space whitespace too)

Sorry, the actual matcher probably should be something like:
[^)]+

So it matches everything except the closing paren.  If the value can contain a paren its more complicated and I’d need to test and check to figure it out.

David J.
 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux