01-25-2011 01:26 PM - edited 01-25-2011 01:27 PM
01-25-2011 02:05 PM
01-25-2011 02:22 PM
@altenbach wrote:
SteveChandler wrote:
Looks more like Bill Clinton code than Rube Goldberg code.
I DID NOT REG-EX WITH THAT RUBE CODE
01-25-2011 02:26 PM
@altenbach wrote:
Looks more like Bill Clinton code than Rube Goldberg code.
I just noticed that my attempt to add a spoiler to my previous post failed (chronic issue for me with Firefox). It contained self-deprecating humor and my boring non-regex-aholic version.
Not to worry, Christian comes along with a better solution, and a MUCH better joke....
01-25-2011 02:49 PM
Ray.R wrote:
Altenbach's(/Darin's) method is better, but there's at least one intermediate nugget for improving your code: autoindexing into a single Concatenate. I have not benchmarked this one, but would expect significantly better performance than a concat each iteration for large input strings.
01-25-2011 03:48 PM
@Darin.K wrote:
Regex, regex, regex...
Sorry Darin... I didn't see your post due to Steve's reply.. 😄
Strangely enough, I do not get the same result as you do. I get: 3215AB2F00000053
But I agree that regex would be the best way to go.. 🙂
01-25-2011 03:49 PM
@altenbach wrote:
Another job for TypecastMan!! 😄
Thanks Christian,
I was close to your solution, but not close enough. I made a mistake by using U8 D'Oh.. or D'Euh!!
Sweet! Thanks!
01-25-2011 03:53 PM
@JackDunaway wrote:
Ray.R wrote:
Altenbach's(/Darin's) method is better, but there's at least one intermediate nugget for improving your code: autoindexing into a single Concatenate. I have not benchmarked this one, but would expect significantly better performance than a concat each iteration for large input strings.
Thanks guys!! Man, I didn't expect my Rube Goldbert code to be so funny!! I was laughing my head-off.. LOL!!
😄
Thanks Jack for the tip, I'll have to remember that one in the future. I prefer the non-For-loop solutions. Why loop when not needed? 😉
01-25-2011 04:35 PM
@Ray.R wrote:
Strangely enough, I do not get the same result as you do. I get: 3215AB2F00000053
But I agree that regex would be the best way to go.. 🙂
You haven't unleashed the power of the Regex yet, you need to Right-Click the Search and Replace function and choose 'Regular Expression'.
Although I am an admitted Regex-a-holic, and look for any excuse to use one, the Type Cast method is probably a bit (ie. a lot) faster if you care. (Even my mini-Rube Reverse+Swap version.) Of course, some depraved individuals may think I am cursing or otherwise when I post Regexes.....
01-25-2011 05:40 PM
Regular expressions make much more sense after they have been compiled to machine code.