Subject | Regarding the new SIMILAR TO in FB 2.5 |
---|---|
Author | dmarmur2002 |
Post date | 2008-07-18T14:40:14Z |
When doing advanced work concerning language research and phonetics
regexps are extensively used. Amongst a plethora of advanced
validation tasks we use regexp for manipulating strings. In this
scenario it is extremely important not only to be able to tell if
there is a match, but also where in the string the (first) match was
found.
Thus, in the expression
'banana' SIMILAR TO 'a+'
we would need to have a return value of 2, not merely true
'banana' SIMILAR TO 'c+' could return 0.
In the release notes for FB 2.5 I cannot see that this is possible.
One could also, in order to maintain the current design, wish for an
alternate predicate such as SIMILAR POS.
Would this be possible?
Another important thing that the release notes does not mention is
being able to use variables in PSQL on both sides of the new
predicate(s). Apologies for not having the ability to download and
test this yet. This was fixed for SUBSTRING in a previous release.
Humbly,
/Dany
regexps are extensively used. Amongst a plethora of advanced
validation tasks we use regexp for manipulating strings. In this
scenario it is extremely important not only to be able to tell if
there is a match, but also where in the string the (first) match was
found.
Thus, in the expression
'banana' SIMILAR TO 'a+'
we would need to have a return value of 2, not merely true
'banana' SIMILAR TO 'c+' could return 0.
In the release notes for FB 2.5 I cannot see that this is possible.
One could also, in order to maintain the current design, wish for an
alternate predicate such as SIMILAR POS.
Would this be possible?
Another important thing that the release notes does not mention is
being able to use variables in PSQL on both sides of the new
predicate(s). Apologies for not having the ability to download and
test this yet. This was fixed for SUBSTRING in a previous release.
Humbly,
/Dany