[REBOL] Re: can't quite get it right...
From: al:bri:xtra at: 7-Sep-2001 17:55
> I'm trying to replace uppercase letters in a string with "[Aa]" (if theletter is "A") Here's a better solution:>> String: "Forrest Gump"== "Forrest Gump">> String: map String func [Letter [char!]][either all [#"A" <= LetterLetter <= #"Z"][rejoin ["[" Letter lowercase to-string Letter "]"]][Letter]] == "[Ff]orrest [Gg]ump">> string== "[Ff]orrest [Gg]ump">>Andrew Martin ICQ: 26227169 http://zen.scripterz.org