Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following sample string:
(My actual strings are much longer than this) s = "You must eat lots of fruits and vegetables every day in the daytime hours." I'm looking for a fast way to replace an entire set of words in the above string as follows: "must" - "should" "fruits" - "eggs" "vegetables" - "bacon" "day" - "morning" The final output should be: "You should eat lots of eggs and bacon every morning in the daytime hours." The string replacements must occur on word boundaries only. So, if "daytime" occurs in the string, then I do not want to change that to "morningtime". The faster the solution, the better. Would a regular expression approach be faster than using a "for-each" construct with a bunch of boolean logic and Instr() calls? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Fast way to truncate string | Excel Programming | |||
DDE Replacement? | Excel Programming | |||
Replacement | Excel Programming | |||
Replacement | Excel Discussion (Misc queries) | |||
Any fast method to parse a string into row & col information | Excel Programming |