![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I'm trying to convert doubles into simple... "bb"->"b" "aaaaabbbbeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerrrrrrrr rrrrrrrrrrrtt"->"abert" etc... Is there a way to do it? Thanks :-) |
#3
| |||
| |||
|
|
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 :-) |
#4
| |||
| |||
|
|
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 :-) |
#5
| |||
| |||
|
|
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 :-) |
#6
| |||
| |||
|
|
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 :-) |
#7
| |||
| |||
|
|
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 :-) |
#8
| |||
| |||
|
|
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 :-) |
#9
| |||
| |||
|
|
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 :-) |
#10
| |||
| |||
|
|
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 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 :-) |
![]() |
| Thread Tools | |
| Display Modes | |
| |