[Gambas-user] about string manipulating and replace$()

fabien gambasfr at ...11...
Sun Jun 19 21:02:50 CEST 2005


Le Dimanche 19 Juin 2005 19:01, rospolosco at ...152... a écrit :
> Hi.
>
> Firtst of all I want to thank Benoit for his fantastic software: gambas is
> absolutely *** G R E A T !!!***.
>
> I'm working on a program. In this program I have to compare millions of
> string, one compared to another one, to know how many chars of string1
> are equal and in the same position in string2. Example:
>
> string1 = "1234567"
> string2 = "0004007"
>
> Result = 2. In fact "4" and "7" are equal and in the same position.
>
> At this moment, I do the job using a  FOR and Mid$(), but the process
> take a very long time when you have to compare thousands or million of
> strings.
>
> I think we should reduce the time for processes like this one, if gambas
> had natively a function for that purpose ( Please, Benoit....) Example:
>
> Result = The_Function$("1234567", "0004007")
>
> > 2
>
> Please, somebody has a suggestion to speed up the process?
>
> Request for Benoit:
>
> Is possible to implement in Replace$() the model in square brackets
> as in the LIKE operator?
>
> I mean:
>
> Replace$("Gambas me gusta muchissimo", [^a-a],"")

I think you are talking about a tool like regular expression ?

in php : ereg_replace

mabe rob can add this to the pcre componant ?

Fabien




>
> > aaa
>
> Thanks.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user





More information about the User mailing list