At 11:29 AM 4/30/04, Yudie wrote:
Great the function works, but what does it means?
SELECT $1 ~ ''^[0-9]+$''

Yudie


The ~ is a pattern matching operator.
^ matches beginning of string
[0-9] matches any numeric digit 0 thru 9.
+ matches one or more occurrences of what came before (digits in this case)
$ matches end of string
The ^ and $ are important - if they were left out, the pattern would match a string containing both numeric and non-numeric data.


You can change the + to * if you decide that an empty string should be considered numeric.

Frank


---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to