Re: [libreoffice-users] regular expression in formula to investigate

2013-08-27 Thread yahoo-pier_andreit
On 08/27/2013 01:37 AM, Brian Barker wrote: At 21:35 26/08/2013 +0200, Pier Andreit wrote: as you know is there some way to start search from the right of strings?? Not directly that I know of. I think you just need to use the $ character - as here - to lock the pattern you are matching to

Re: [libreoffice-users] regular expression in formula to investigate

2013-08-26 Thread yahoo-pier_andreit
On 08/25/2013 01:35 AM, Brian Barker wrote: At 23:26 24/08/2013 +0200, Pier Andreit wrote: [...] I cannot understand this part: SEARCH(/[^/]*$, CELL(filename)) I know it search in CELL(filename) but I cannot understand the criteria /[^/]*$ from the tests it seems to find the last / in any

Re: [libreoffice-users] regular expression in formula to investigate

2013-08-26 Thread Brian Barker
At 21:35 26/08/2013 +0200, Pier Andreit wrote: as you know is there some way to start search from the right of strings?? Not directly that I know of. I think you just need to use the $ character - as here - to lock the pattern you are matching to the end of the text (or of a paragraph, in

[libreoffice-users] regular expression in formula to investigate

2013-08-24 Thread yahoo-pier_andreit
I found this very beautiful and useful formula to estract filename in a cell: =REPLACE(REPLACE(CELL(filename),FIND(.,CELL(filename),1),(LEN(CELL(filename))-FIND(.,CELL(filename),1)+1),),1,SEARCH(/[^/]*$, CELL(filename)),) I cannot understand this part: SEARCH(/[^/]*$, CELL(filename) I know

Re: [libreoffice-users] regular expression in formula to investigate

2013-08-24 Thread Brian Barker
At 23:26 24/08/2013 +0200, Pier Andreit wrote: [...] I cannot understand this part: SEARCH(/[^/]*$, CELL(filename)) I know it search in CELL(filename) but I cannot understand the criteria /[^/]*$ from the tests it seems to find the last / in any string, and if you substitute the / with . it