Subject | Re: ODP: [firebird-support] Built in RegEx Capability? |
---|---|
Author | Lester Caine |
Post date | 2019-02-12T17:50:26Z |
On 12/02/2019 16:36, Karol Bieniaszewski liviuslivius@...
[firebird-support] wrote:
the regex fails on, such as 2 spaces before the 'p', but it also throws
errors where the p element is broken - negative offset.
Nothing is easy :( But I think I can combine to two and populate the new
'V' and 'P' fields.
Part of the problem is being able to list the records properly and if
one was starting from scratch they would probably be '0's padded numbers
but this data has been built up over years and there is no easy way to
rename all the files now ...
--
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] wrote:
> SelectMoved over to FB3 server now and this works on a few edge cases which
> D.NAZWA
> , SUBSTRING(D.NAZWA FROM POSITION('V', D.NAZWA)+1 FOR POSITION('p',
> D.NAZWA)-3) AS V
> , SUBSTRING(D.NAZWA FROM POSITION('p', D.NAZWA)+1 FOR POSITION(' ',
> SUBSTRING(D.NAZWA FROM POSITION('p', D.NAZWA)))-2) AS P
> from
> (SELECT 'V12 p234 The state of the nation.pdf' AS NAZWA FROM
> RDB$DATABASE) D
the regex fails on, such as 2 spaces before the 'p', but it also throws
errors where the p element is broken - negative offset.
Nothing is easy :( But I think I can combine to two and populate the new
'V' and 'P' fields.
Part of the problem is being able to list the records properly and if
one was starting from scratch they would probably be '0's padded numbers
but this data has been built up over years and there is no easy way to
rename all the files now ...
--
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