January 31, 200422 yr Hi all, How do I substitute text strings that are _not_ part of a larger text string. For example, if I want to substitute all the 'ark's within a text field with 'arrak' -- I want to make sure the substitution only works on the word 'ark' - but not on for example: 'bark'. In short: bla ark bla should become : bla arrak bla bla ark, bla : should become : bla arrak, bla BUT bla bark bla : should become : bla bark bla I have a feeling this is not difficult -- but I am hitting a wall and figured I'd throw this out there. Thanks,
January 31, 200422 yr The Substitute function respects spaces. So Substitute ( field, " ark ", " arrak ") The glitch is if you have sentences with " ark." or " ark?" or " ark," etc., ":", "!". In which case you just have to nest Substitutes: Substitute (Substitute (Substitute ( field, " ark ", "arrak"), " ark.", " arrak."), " ark,", " arrak,") You can use globals for the parameters, so one script will do any word: _gFind _gRepace
Create an account or sign in to comment