<HTML><DIV class=bgcolor STYLE="background-color: ;"><DIV>
<DIV>Hi Andreas,</DIV>
<DIV> </DIV>
<DIV>strange but I don't see html from my original email
received from the mailing list, hope this reply is ok:)</DIV>
<DIV> </DIV>
<DIV>If I'm not wrong, the example you've provided is trying to
return matching rows from multiple patterns and texts as
inputs in the regex search.</DIV>
<DIV> </DIV>
<DIV>The text in regular expression have to be just a single
string(with no white character) for my case. Matching should
then be done with patterns from each row, returning the row(s)
that contain matching regex pattern(s). Appreciate any advice.
Thanks.</DIV>
<DIV> </DIV>
<DIV>Regards</DIV>
<DIV>pgdb</DIV>
<DIV> </DIV>
<DIV>A. Kretschmer writes: </DIV>
<DIV></DIV>
<DIV>> am 13.04.2006, um 12:47:38 +0000 mailte pgdb
folgendes: </DIV>
<DIV>>> </DIV>
<DIV>>>
<DIV class=bgcolor>
<DIV></DIV>
<DIV>>>
<DIV></DIV>
<DIV>>>
<DIV></DIV>
<DIV>>>
<DIV>Hi,</DIV></DIV>
<DIV>>>
<DIV> </DIV></DIV>
<DIV>>>
<DIV>like to know how, if possible, for patterns </DIV>
<DIV>>> as attribute in a table to be used in a regex
search with a </DIV>
<DIV>>> fixed string. The query should therefore return
the rows that </DIV>
<DIV>>> have matching patterns with the single
text.</DIV></DIV>
<DIV>> </DIV>
<DIV>> It's hard to read such text, please use plain ASCII
insteed HTML. </DIV>
<DIV>> </DIV>
<DIV>> Perhaps you are looking for something like this:
</DIV>
<DIV>> </DIV>
<DIV>> test=# select * from search; </DIV>
<DIV>> text </DIV>
<DIV>> ---------------- </DIV>
<DIV>> this is a test </DIV>
<DIV>> (1 row) </DIV>
<DIV>> </DIV>
<DIV>> test=# select * from pattern; </DIV>
<DIV>> text </DIV>
<DIV>> --------- </DIV>
<DIV>> ^this.* </DIV>
<DIV>> ^foo </DIV>
<DIV>> (2 rows) </DIV>
<DIV>> </DIV>
<DIV>> test=# select pattern.text, search.text from pattern,
search where search.text ~ pattern.text; </DIV>
<DIV>> text | text </DIV>
<DIV>> ---------+---------------- </DIV>
<DIV>> ^this.* | this is a test </DIV>
<DIV>> (1 row) </DIV>
<DIV>> </DIV>
<DIV>> </DIV>
<DIV>> </DIV>
<DIV>> HTH, Andreas </DIV>
<DIV>> -- </DIV>
<DIV>> Andreas Kretschmer (Kontakt: siehe Header) </DIV>
<DIV>> Heynitz: 035242/47215, D1: 0160/7141639 </DIV>
<DIV>> GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net </DIV>
<DIV>> === Schollglas Unternehmensgruppe === </DIV>
<DIV>> </DIV>
<DIV>> ---------------------------(end of
broadcast)--------------------------- </DIV>
<DIV>> TIP 3: Have you checked our extensive FAQ? </DIV>
<DIV>> </DIV>
<DIV>> http://www.postgresql.org/docs/faq </DIV>
<DIV></DIV>
<DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></HTML>
<DIV>________________________________</DIV>
<DIV>Free POP3 Email from <a href="http://www.gawab.com"
target="_blank">www.gawab.com</a></DIV>
<DIV>Sign up NOW and get your account @gawab.com!!</DIV>