Re: [firebird-support] Built in RegEx Capability?
On 11/02/2019 22:22, Dimitry Sibiryakov s...@ibphoenix.com [firebird-support] wrote: > 11.02.2019 22:18, Lester caineles...@lsces.co.uk [firebird-support] wrote: >> Ideally I need to extract the 'V' element and the 'p' element into their >> own fields so I can look up Volume '12' and page '234' or list all the >> pdf's for Volume '12' in page order. > You could use "Regular expression SUBSTRING" described in > firebird3/doc/README.substring_similar.txt. Would help if we did not have to rely on a variable target :( I've got https://www.firebirdsql.org/file/documentation/release_notes/html/rlsnotes253.html#rnfb25-dml-regex which the FB3 release notes link back to ... AH ... on a linux installation for SUSE it's hidden in /usr/share/doc/packages/firebird/sql.extensions but it's even less helpful than the online page. None of the examples show pulling the 'content of the second match' to insert in an update statement? They all seem to be returns for Boolean operations? -- 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 ++ Visit http://www.firebirdsql.org and click the Documentation item on the main (top) menu. Try FAQ and other links from the left-side menu there. Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ ++ Yahoo Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo Groups is subject to: https://info.yahoo.com/legal/us/yahoo/utos/terms/
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
Re: [firebird-support] Built in RegEx Capability?
11.02.2019 22:18, Lester Caine les...@lsces.co.uk [firebird-support] wrote: > Ideally I need to extract the 'V' element and the 'p' element into their > own fields so I can look up Volume '12' and page '234' or list all the > pdf's for Volume '12' in page order. You could use "Regular expression SUBSTRING" described in firebird3/doc/README.substring_similar.txt. -- WBR, SD. ++ Visit http://www.firebirdsql.org and click the Documentation item on the main (top) menu. Try FAQ and other links from the left-side menu there. Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ ++ Yahoo Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo Groups is subject to: https://info.yahoo.com/legal/us/yahoo/utos/terms/
[firebird-support] Built in RegEx Capability?
I have some data in a table which I need to 'pull apart'. It's essentially a ID for a reference but it's not as tidy as I would like because of the variable length and a little variable in case although the format is consistent. V p .pdf For example 'V12 p234 The state of the nation.pdf' Ideally I need to extract the 'V' element and the 'p' element into their own fields so I can look up Volume '12' and page '234' or list all the pdf's for Volume '12' in page order. I can run it through PHP and RegEx the text and push the new fields back, but is it possible to do this in a query in Firebird. I THINK what I'm seeing is that I could search for matching patterns but not actually extract the match to a new field? -- 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