dbTalk Databases Forums  

Way to transform "bbbbbbbbbbbbbeee" into "be" ?

comp.databases.filemaker comp.databases.filemaker


Discuss Way to transform "bbbbbbbbbbbbbeee" into "be" ? in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Boubahha
 
Posts: n/a

Default Way to transform "bbbbbbbbbbbbbeee" into "be" ? - 11-29-2005 , 03:28 AM






Hello,

I'm trying to convert doubles into simple...

"bb"->"b"
"aaaaabbbbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerrrrrrrr rrrrrrrrrrrtt"->"abert"
etc...

Is there a way to do it?

Thanks :-)



Reply With Quote
  #2  
Old   
Bill Marriott
 
Posts: n/a

Default Re: Way to transform "bbbbbbbbbbbbbeee" into "be" ? - 11-29-2005 , 07:07 AM






Answered under your prior thread.

"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote

Quote:
Hello,

I'm trying to convert doubles into simple...

"bb"->"b"
"aaaaabbbbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerrrrrrrr rrrrrrrrrrrtt"->"abert"
etc...

Is there a way to do it?

Thanks :-)




Reply With Quote
  #3  
Old   
Boubahha
 
Posts: n/a

Default Re: Way to transform "bbbbbbbbbbbbbeee" into "be" ? - 11-29-2005 , 09:42 AM



Function RemoveConsecDuplicate ( string ; start )
------------------------------------------
If(
Length( string );
If(
Lower( Right( start; 1 ) ) = Lower( Left( string; 1 ) );
RemoveConsecDuplicate( Middle( string; 2; Length( string ) );
start );
RemoveConsecDuplicate( Middle( string; 2; Length( string ) ); start &
Left( string; 1 ) )
);
start
)
------------------------------------------

"Bill Marriott" <wjm (AT) wjm (DOT) org> a écrit dans le message de news:
dNOdnVHpaO7gzxHenZ2dnUVZ_sCdnZ2d (AT) comcast (DOT) com...
Quote:
Answered under your prior thread.

"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote in message
news:438c1f2a$0$5996$636a15ce (AT) news (DOT) free.fr...
Hello,

I'm trying to convert doubles into simple...

"bb"->"b"
"aaaaabbbbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerrrrrrrr rrrrrrrrrrrtt"->"abert"
etc...

Is there a way to do it?

Thanks :-)






Reply With Quote
  #4  
Old   
Bill Marriott
 
Posts: n/a

Default Re: Way to transform "bbbbbbbbbbbbbeee" into "be" ? - 11-29-2005 , 09:58 AM



Too bad that puts a "1" in front of everything.

"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote

Quote:
Function RemoveConsecDuplicate ( string ; start )
------------------------------------------
If(
Length( string );
If(
Lower( Right( start; 1 ) ) = Lower( Left( string; 1 ) );
RemoveConsecDuplicate( Middle( string; 2; Length( string ) );
start );
RemoveConsecDuplicate( Middle( string; 2; Length( string ) ); start
& Left( string; 1 ) )
);
start
)
------------------------------------------

"Bill Marriott" <wjm (AT) wjm (DOT) org> a écrit dans le message de news:
dNOdnVHpaO7gzxHenZ2dnUVZ_sCdnZ2d (AT) comcast (DOT) com...
Answered under your prior thread.

"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote in message
news:438c1f2a$0$5996$636a15ce (AT) news (DOT) free.fr...
Hello,

I'm trying to convert doubles into simple...

"bb"->"b"
"aaaaabbbbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerrrrrrrr rrrrrrrrrrrtt"->"abert"
etc...

Is there a way to do it?

Thanks :-)








Reply With Quote
  #5  
Old   
Bill Marriott
 
Posts: n/a

Default Re: Way to transform "bbbbbbbbbbbbbeee" into "be" ? - 11-29-2005 , 10:10 AM



Right, start should be empty. Not bad... makes it a lot easier to use two
parameters.

Did you come up with that yourself?

Bill

"Bill Marriott" <wjm (AT) wjm (DOT) org> wrote

Quote:
Too bad that puts a "1" in front of everything.

"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote in message
news:438c76f3$0$7359$636a55ce (AT) news (DOT) free.fr...
Function RemoveConsecDuplicate ( string ; start )
------------------------------------------
If(
Length( string );
If(
Lower( Right( start; 1 ) ) = Lower( Left( string; 1 ) );
RemoveConsecDuplicate( Middle( string; 2; Length( string ) );
start );
RemoveConsecDuplicate( Middle( string; 2; Length( string ) ); start
& Left( string; 1 ) )
);
start
)
------------------------------------------

"Bill Marriott" <wjm (AT) wjm (DOT) org> a écrit dans le message de news:
dNOdnVHpaO7gzxHenZ2dnUVZ_sCdnZ2d (AT) comcast (DOT) com...
Answered under your prior thread.

"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote in message
news:438c1f2a$0$5996$636a15ce (AT) news (DOT) free.fr...
Hello,

I'm trying to convert doubles into simple...

"bb"->"b"
"aaaaabbbbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerrrrrrrr rrrrrrrrrrrtt"->"abert"
etc...

Is there a way to do it?

Thanks :-)










Reply With Quote
  #6  
Old   
Boubahha
 
Posts: n/a

Default Re: Way to transform "bbbbbbbbbbbbbeee" into "be" ? - 11-29-2005 , 10:55 AM



http://www.fmsource.com/forum/index.php?showtopic=28385

"Bill Marriott" <wjm (AT) wjm (DOT) org> a écrit dans le message de news:
a8OdnS1tWvPo4BHenZ2dnUVZ_tSdnZ2d (AT) comcast (DOT) com...
Quote:
Right, start should be empty. Not bad... makes it a lot easier to use two
parameters.

Did you come up with that yourself?

Bill

"Bill Marriott" <wjm (AT) wjm (DOT) org> wrote in message
news:i9KdnWt0lYYH5xHenZ2dnUVZ_sWdnZ2d (AT) comcast (DOT) com...
Too bad that puts a "1" in front of everything.

"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote in message
news:438c76f3$0$7359$636a55ce (AT) news (DOT) free.fr...
Function RemoveConsecDuplicate ( string ; start )
------------------------------------------
If(
Length( string );
If(
Lower( Right( start; 1 ) ) = Lower( Left( string; 1 ) );
RemoveConsecDuplicate( Middle( string; 2; Length( string ) );
start );
RemoveConsecDuplicate( Middle( string; 2; Length( string ) );
start & Left( string; 1 ) )
);
start
)
------------------------------------------

"Bill Marriott" <wjm (AT) wjm (DOT) org> a écrit dans le message de news:
dNOdnVHpaO7gzxHenZ2dnUVZ_sCdnZ2d (AT) comcast (DOT) com...
Answered under your prior thread.

"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote in message
news:438c1f2a$0$5996$636a15ce (AT) news (DOT) free.fr...
Hello,

I'm trying to convert doubles into simple...

"bb"->"b"
"aaaaabbbbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerrrrrrrr rrrrrrrrrrrtt"->"abert"
etc...

Is there a way to do it?

Thanks :-)












Reply With Quote
  #7  
Old   
yooPlugs
 
Posts: n/a

Default Re: Way to transform "bbbbbbbbbbbbbeee" into "be" ? - 11-29-2005 , 01:39 PM



In addition to the solutions already proposed, you might also benefit from
looking into regular expressions. This is especially true if you anticipate
performing a variety of text transformations similar to the one you have
described.

An example of how you would collapse repeated characters using our regular
expression plug-in (yooMatch) is:

yooMatch_replace( "aaabberrrrtt"; "(.)\1+"; "\1"; "g" )

This function call would return "abert" as desired.

If your needs are fairly simple and limited to collapsing repeated
characters, then clearly you are well-served by using built-in functionality
as already discussed. If your needs are somewhat broader, I believe you will
find that regular expressions constitute an extremely useful tool for which
there is no reasonable substitute in many situations.

Darren
yooPlugs - http://www.yooplugs.com




On 11/29/05 10:55 AM, in article 438c87e8$0$7341$636a55ce (AT) news (DOT) free.fr,
"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote:

Quote:
http://www.fmsource.com/forum/index.php?showtopic=28385

"Bill Marriott" <wjm (AT) wjm (DOT) org> a écrit dans le message de news:
a8OdnS1tWvPo4BHenZ2dnUVZ_tSdnZ2d (AT) comcast (DOT) com...
Right, start should be empty. Not bad... makes it a lot easier to use two
parameters.

Did you come up with that yourself?

Bill

"Bill Marriott" <wjm (AT) wjm (DOT) org> wrote in message
news:i9KdnWt0lYYH5xHenZ2dnUVZ_sWdnZ2d (AT) comcast (DOT) com...
Too bad that puts a "1" in front of everything.

"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote in message
news:438c76f3$0$7359$636a55ce (AT) news (DOT) free.fr...
Function RemoveConsecDuplicate ( string ; start )
------------------------------------------
If(
Length( string );
If(
Lower( Right( start; 1 ) ) = Lower( Left( string; 1 ) );
RemoveConsecDuplicate( Middle( string; 2; Length( string ) );
start );
RemoveConsecDuplicate( Middle( string; 2; Length( string ) );
start & Left( string; 1 ) )
);
start
)
------------------------------------------

"Bill Marriott" <wjm (AT) wjm (DOT) org> a écrit dans le message de news:
dNOdnVHpaO7gzxHenZ2dnUVZ_sCdnZ2d (AT) comcast (DOT) com...
Answered under your prior thread.

"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote in message
news:438c1f2a$0$5996$636a15ce (AT) news (DOT) free.fr...
Hello,

I'm trying to convert doubles into simple...

"bb"->"b"
"aaaaabbbbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerrrrrrrr rrrrrrrrrrrtt"->"abert"
etc...

Is there a way to do it?

Thanks :-)













Reply With Quote
  #8  
Old   
Boubahha
 
Posts: n/a

Default Re: Way to transform "bbbbbbbbbbbbbeee" into "be" ? - 12-08-2005 , 04:42 AM



Thanks for the tip but http://www.yooplugs.com/yooMatch/yooMatch-1.0.zip
doesn't work :-(

"yooPlugs" <groups-spamthwart (AT) yooplugs (DOT) com> a écrit dans le message de news:
BFB20A73.4ABA%groups-spamthwart (AT) yooplugs (DOT) com...
Quote:
In addition to the solutions already proposed, you might also benefit from
looking into regular expressions. This is especially true if you
anticipate
performing a variety of text transformations similar to the one you have
described.

An example of how you would collapse repeated characters using our regular
expression plug-in (yooMatch) is:

yooMatch_replace( "aaabberrrrtt"; "(.)\1+"; "\1"; "g" )

This function call would return "abert" as desired.

If your needs are fairly simple and limited to collapsing repeated
characters, then clearly you are well-served by using built-in
functionality
as already discussed. If your needs are somewhat broader, I believe you
will
find that regular expressions constitute an extremely useful tool for
which
there is no reasonable substitute in many situations.

Darren
yooPlugs - http://www.yooplugs.com




On 11/29/05 10:55 AM, in article 438c87e8$0$7341$636a55ce (AT) news (DOT) free.fr,
"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote:

http://www.fmsource.com/forum/index.php?showtopic=28385

"Bill Marriott" <wjm (AT) wjm (DOT) org> a écrit dans le message de news:
a8OdnS1tWvPo4BHenZ2dnUVZ_tSdnZ2d (AT) comcast (DOT) com...
Right, start should be empty. Not bad... makes it a lot easier to use
two
parameters.

Did you come up with that yourself?

Bill

"Bill Marriott" <wjm (AT) wjm (DOT) org> wrote in message
news:i9KdnWt0lYYH5xHenZ2dnUVZ_sWdnZ2d (AT) comcast (DOT) com...
Too bad that puts a "1" in front of everything.

"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote in message
news:438c76f3$0$7359$636a55ce (AT) news (DOT) free.fr...
Function RemoveConsecDuplicate ( string ; start )
------------------------------------------
If(
Length( string );
If(
Lower( Right( start; 1 ) ) = Lower( Left( string; 1 ) );
RemoveConsecDuplicate( Middle( string; 2; Length( string ) );
start );
RemoveConsecDuplicate( Middle( string; 2; Length( string ) );
start & Left( string; 1 ) )
);
start
)
------------------------------------------

"Bill Marriott" <wjm (AT) wjm (DOT) org> a écrit dans le message de news:
dNOdnVHpaO7gzxHenZ2dnUVZ_sCdnZ2d (AT) comcast (DOT) com...
Answered under your prior thread.

"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote in message
news:438c1f2a$0$5996$636a15ce (AT) news (DOT) free.fr...
Hello,

I'm trying to convert doubles into simple...

"bb"->"b"
"aaaaabbbbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerrrrrrrr rrrrrrrrrrrtt"->"abert"
etc...

Is there a way to do it?

Thanks :-)















Reply With Quote
  #9  
Old   
Bill Marriott
 
Posts: n/a

Default Re: Way to transform "bbbbbbbbbbbbbeee" into "be" ? - 12-08-2005 , 05:05 AM



Boubahha,

What do you mean, "it doesn't work?"

The link provided certainly does work. The extension works. The sample
calculation Darren provided works.

In fact, the solution I put together for you correctly distills duplicates
and accurately determines the Soundex code for even the most perverse input
(though did find a more elegant recursive function alternative).

I am wondering if there is *anything* that will make you happy.

Bill


"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote

Quote:
Thanks for the tip but http://www.yooplugs.com/yooMatch/yooMatch-1.0.zip
doesn't work :-(

"yooPlugs" <groups-spamthwart (AT) yooplugs (DOT) com> a écrit dans le message de
news: BFB20A73.4ABA%groups-spamthwart (AT) yooplugs (DOT) com...
In addition to the solutions already proposed, you might also benefit
from
looking into regular expressions. This is especially true if you
anticipate
performing a variety of text transformations similar to the one you have
described.

An example of how you would collapse repeated characters using our
regular
expression plug-in (yooMatch) is:

yooMatch_replace( "aaabberrrrtt"; "(.)\1+"; "\1"; "g" )

This function call would return "abert" as desired.

If your needs are fairly simple and limited to collapsing repeated
characters, then clearly you are well-served by using built-in
functionality
as already discussed. If your needs are somewhat broader, I believe you
will
find that regular expressions constitute an extremely useful tool for
which
there is no reasonable substitute in many situations.

Darren
yooPlugs - http://www.yooplugs.com




On 11/29/05 10:55 AM, in article 438c87e8$0$7341$636a55ce (AT) news (DOT) free.fr,
"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote:

http://www.fmsource.com/forum/index.php?showtopic=28385

"Bill Marriott" <wjm (AT) wjm (DOT) org> a écrit dans le message de news:
a8OdnS1tWvPo4BHenZ2dnUVZ_tSdnZ2d (AT) comcast (DOT) com...
Right, start should be empty. Not bad... makes it a lot easier to use
two
parameters.

Did you come up with that yourself?

Bill

"Bill Marriott" <wjm (AT) wjm (DOT) org> wrote in message
news:i9KdnWt0lYYH5xHenZ2dnUVZ_sWdnZ2d (AT) comcast (DOT) com...
Too bad that puts a "1" in front of everything.

"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote in message
news:438c76f3$0$7359$636a55ce (AT) news (DOT) free.fr...
Function RemoveConsecDuplicate ( string ; start )
------------------------------------------
If(
Length( string );
If(
Lower( Right( start; 1 ) ) = Lower( Left( string; 1 ) );
RemoveConsecDuplicate( Middle( string; 2; Length( string ) );
start );
RemoveConsecDuplicate( Middle( string; 2; Length( string ) );
start & Left( string; 1 ) )
);
start
)
------------------------------------------

"Bill Marriott" <wjm (AT) wjm (DOT) org> a écrit dans le message de news:
dNOdnVHpaO7gzxHenZ2dnUVZ_sCdnZ2d (AT) comcast (DOT) com...
Answered under your prior thread.

"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote in message
news:438c1f2a$0$5996$636a15ce (AT) news (DOT) free.fr...
Hello,

I'm trying to convert doubles into simple...

"bb"->"b"
"aaaaabbbbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerrrrrrrr rrrrrrrrrrrtt"->"abert"
etc...

Is there a way to do it?

Thanks :-)

















Reply With Quote
  #10  
Old   
Boubahha
 
Posts: n/a

Default Re: Way to transform "bbbbbbbbbbbbbeee" into "be" ? - 12-08-2005 , 07:43 AM



"Bill Marriott" <wjm (AT) wjm (DOT) org> a écrit dans le message de news:
dn9413$1ne$1 (AT) domitilla (DOT) aioe.org...
Quote:
Boubahha,

What do you mean, "it doesn't work?"
Bill Marriott,

I'm meaning that i can't reach this url. My english is very poor. Thank you
for your invaluable assistance.

Quote:
The link provided certainly does work. The extension works. The sample
calculation Darren provided works.

In fact, the solution I put together for you correctly distills duplicates
and accurately determines the Soundex code for even the most perverse
input (though did find a more elegant recursive function alternative).

I am wondering if there is *anything* that will make you happy.
You are totally right.

Boubahha

Quote:
Bill


"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote in message
news:43980e04$0$21241$626a54ce (AT) news (DOT) free.fr...
Thanks for the tip but http://www.yooplugs.com/yooMatch/yooMatch-1.0.zip
doesn't work :-(

"yooPlugs" <groups-spamthwart (AT) yooplugs (DOT) com> a écrit dans le message de
news: BFB20A73.4ABA%groups-spamthwart (AT) yooplugs (DOT) com...
In addition to the solutions already proposed, you might also benefit
from
looking into regular expressions. This is especially true if you
anticipate
performing a variety of text transformations similar to the one you have
described.

An example of how you would collapse repeated characters using our
regular
expression plug-in (yooMatch) is:

yooMatch_replace( "aaabberrrrtt"; "(.)\1+"; "\1"; "g" )

This function call would return "abert" as desired.

If your needs are fairly simple and limited to collapsing repeated
characters, then clearly you are well-served by using built-in
functionality
as already discussed. If your needs are somewhat broader, I believe you
will
find that regular expressions constitute an extremely useful tool for
which
there is no reasonable substitute in many situations.

Darren
yooPlugs - http://www.yooplugs.com




On 11/29/05 10:55 AM, in article 438c87e8$0$7341$636a55ce (AT) news (DOT) free.fr,
"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote:

http://www.fmsource.com/forum/index.php?showtopic=28385

"Bill Marriott" <wjm (AT) wjm (DOT) org> a écrit dans le message de news:
a8OdnS1tWvPo4BHenZ2dnUVZ_tSdnZ2d (AT) comcast (DOT) com...
Right, start should be empty. Not bad... makes it a lot easier to use
two
parameters.

Did you come up with that yourself?

Bill

"Bill Marriott" <wjm (AT) wjm (DOT) org> wrote in message
news:i9KdnWt0lYYH5xHenZ2dnUVZ_sWdnZ2d (AT) comcast (DOT) com...
Too bad that puts a "1" in front of everything.

"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote in message
news:438c76f3$0$7359$636a55ce (AT) news (DOT) free.fr...
Function RemoveConsecDuplicate ( string ; start )
------------------------------------------
If(
Length( string );
If(
Lower( Right( start; 1 ) ) = Lower( Left( string; 1 ) );
RemoveConsecDuplicate( Middle( string; 2; Length( string ) );
start );
RemoveConsecDuplicate( Middle( string; 2; Length( string ) );
start & Left( string; 1 ) )
);
start
)
------------------------------------------

"Bill Marriott" <wjm (AT) wjm (DOT) org> a écrit dans le message de news:
dNOdnVHpaO7gzxHenZ2dnUVZ_sCdnZ2d (AT) comcast (DOT) com...
Answered under your prior thread.

"Boubahha" <fsdf (AT) fdsfdfds (DOT) com> wrote in message
news:438c1f2a$0$5996$636a15ce (AT) news (DOT) free.fr...
Hello,

I'm trying to convert doubles into simple...

"bb"->"b"
"aaaaabbbbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerrrrrrrr rrrrrrrrrrrtt"->"abert"
etc...

Is there a way to do it?

Thanks :-)



















Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.