sorry for the previous post, I accidentally pressed something in my keyboard....
Hi all, me again :-) after a second reading of the IDL documentation, I realized that probably, I've initially misunderstood the point Anyway the intersting (but problematic) part of the document says: -------------------------------------------------- struct com.sun.star.util.SearchResult subRegExpressions [....omissis...] For regular expressions it can be greater than 1. If the value is 1, startoffset[0] and endoffset[0] points to the matching sub string if value is > 1, still startoffset[0] and endoffset[0] points to the matching substring for whole regular expression startoffset[i] and endoffset[i] points to the matching substring of i th matching substring. -------------------------------------------------- I tried to define substrings in the search string using parenthesis, f.e.: searchString = "(so).*(xt)" textToSearch = "some text" but the subRegExpressions value is always 1 how should I specify the search string in order to obtain a subRegExpressions > 1 ? thanks Paolo Alle 18:17, giovedì 9 giugno 2005, Paolo Mantovani ha scritto: > Hi all, > > The method XTextSearch.searchForward results an > com.sun.star.util.SearchResult structure > > http://api.openoffice.org/docs/common/ref/com/sun/star/util/SearchResult.ht >ml > > As you can see, IDL documentation says that setting the searchAlgorithm to > REGEXP I can find multiple sub matches but, in my tests I'm obtaining ever > and only the first one > > At the end of this post there's my testing code > am I doing something wrong ? > Perhaps I missed some SearchFlags ? > > > Thanks in advance for any help > Paolo M. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]