Re: [firebird-support] Re: Built in RegEx Capability?
On 11-2-2019 23:51, blackfalconsoftw...@outlook.com [firebird-support] wrote: > I believe this has been done with such database engines as SQL Server > and PostgreSQL. > > However, the Firebird Database Engine has a stricter standard as to what > is implemented in the SQL language than other such engines. > Nonetheless, it appears that there is some similar capabilities as the > following link describes... > https://stackoverflow.com/questions/21432507/repetitions-with-regexes-in-firebird That doesn't have to do with a 'stricter standard', it has to do with having a smaller team and having to choose what you do and don't. And in that case, following the ISO-9075 as a guideline instead of inventing your own, is a better solution. But, that said, the SQL standard actually describes more extensive regular expression features than Firebird currently has (eg LIKE_REGEX, OCCURRENCES_REGEX, POSITION_REGEX, SUBSTRING_REGEX, TRANSLATE_REGEX), which btw don't use the atrocity that is the SQL regex used by SIMILAR TO and SUBSTRING(.. SIMILAR TO ...), but the XSLT variant which is similar to Java's and Perl. This also provide support for groups, etc. > It may be more convenient to pull out data via a Regex expression in SQL > code but it is rather redundant since all of the major development > languages already support extensive Regex pattern matching capabilities... It can have its uses where retrieving data out to a programming language and then back again to the database is inefficient. But I agree, in general, a need for this would be symptomatic of having individual data items encoded in a single string. Mark -- Mark Rotteveel
Re: [firebird-support] Re: Built in RegEx Capability?
On 11/02/2019 22:51, blackfalconsoftw...@outlook.com [firebird-support] wrote: > It may be more convenient to pull out data via a Regex expression in SQL > code but it is rather redundant since all of the major development > languages already support extensive Regex pattern matching capabilities... 20 years ago I'd just have rolled a UDF to give me the two values which I could then use in the database. It looks like I still need to do that. Or as you say cycle all the data through PHP ... which messes up simply upgrading the databases via a local script. -- Lester Caine - G8HFL - Contact - https://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - https://lsces.co.uk EnquirySolve - https://enquirysolve.com/ Model Engineers Digital Workshop - https://medw.co.uk Rainbow Digital Media - https://rainbowdigitalmedia.co.uk
[firebird-support] Re: Built in RegEx Capability?
I believe this has been done with such database engines as SQL Server and PostgreSQL. However, the Firebird Database Engine has a stricter standard as to what is implemented in the SQL language than other such engines. Nonetheless, it appears that there is some similar capabilities as the following link describes... https://stackoverflow.com/questions/21432507/repetitions-with-regexes-in-firebird https://stackoverflow.com/questions/21432507/repetitions-with-regexes-in-firebird It may be more convenient to pull out data via a Regex expression in SQL code but it is rather redundant since all of the major development languages already support extensive Regex pattern matching capabilities... Steve Naidamast Sr. Software Engineer