473,406 Members | 2,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Writing regex in PL's

Is there anyone on this list who has preferred to use regexes from PL's
(e.g. plperl, plruby) in CHECK constraints or other places instead of
the flavor provided by Postgres? Do you find your approach satisfying?
Do you also do things like cache the pattern so you don't have to
compile the regex on every function invocation?

I'm also about to choose this route, mainly because I want to separate
the patterns into a Ruby module and would rather have one regex flavor
(and I can never remember all that POSIX stuffs anyway :-).

--
dave
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #1
1 1126
On Sat, 2004-08-07 at 14:40, David Garamond wrote:
Is there anyone on this list who has preferred to use regexes from PL's
(e.g. plperl, plruby) in CHECK constraints or other places instead of
the flavor provided by Postgres? Do you find your approach satisfying?
Do you also do things like cache the pattern so you don't have to
compile the regex on every function invocation?

I'm also about to choose this route, mainly because I want to separate
the patterns into a Ruby module and would rather have one regex flavor
(and I can never remember all that POSIX stuffs anyway :-).


I've never used plperl for regex, and I'm pretty comfy with posix regex,
as long as it's simple. Let's face it, perl regex is king for a reason,
and it ain't cause they're easy to read.

Now, SQL regex, that gives me a headache.
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: el_roachmeister | last post by:
Is there a good article that explains why php does not support =~ like perl for regex? I am confused by all the different ways one can do regex in php but it would seem supporting =~ would...
2
by: rjb | last post by:
Hi there I have a text file which looks like the one below. I'm trying to write a program which will go through each of those lines (for each section separated by an empty line) and give me: ...
8
by: rjb | last post by:
Hi! Could somebody have a look and help me to optimize the code below. It may look like very bad way of coding, but this stuff is very, very new for me. I've included just few lines. Regex...
17
by: clintonG | last post by:
I'm using an .aspx tool I found at but as nice as the interface is I think I need to consider using others. Some can generate C# I understand. Your preferences please... <%= Clinton Gallagher ...
4
by: mikewolfbaltimore | last post by:
Hello all have a regex question... I want to split an address into descrete parts so 709 S Milton Ave is split into number = 709 Direction = S Name = Milton
3
by: ommail | last post by:
Hi! I have a simple regural expression: \w+$ and text to match: abc dddd ggg hhh
3
by: ommail | last post by:
Hi I wonder if regular expressions are in general sower than using classes like String and Char when used for validating/parsing text data? I've done some simple test (using IsMatch()) method...
3
by: neino | last post by:
Hello, did anyone of You have problems using boost::regex ? That code below : #include "boost/regex.hpp" /*1*/ int main() /*2*/ { /*3*/...
8
by: adamisko | last post by:
Hello, what is wrong with this code, I want to divide string to pieces 4 chars length. string tekst = "divide string to 4 chars pieces"; Regex regex = new Regex("(.{1,4})"); string substrings =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.