If the actual data is like 'ALLDrone Client1Function2', what do you want to get when you replace?
Let me go back to your original question, where the beginning of the string would have "RE " or "ALL " or multiples of those in any combination. To replace all of those, you can do an update like this:DECLARE @Foo TABLE (CommandName VARCHAR(MAX))
INSERT @Foo (CommandName) VALUES
('RE tester'),
('RE tester RE'),
('tester RE'),
('RE RE RE tester'),
('RE retester'),
('ALL call me reguarding...'),
('ALL call me ALL at once'),
('call me RE'),
('ALL ALL ALL call me'),
('ALL call me RE: A Tester'),
('ALL RE tester call'),
('RE ALL tester call'),
('RE ALL RE ALL something else added by JK'),
('RE ALL ALL ALL RE something else again RE ALL ALL');
UPDATE @Foo SET
CommandName = STUFF(CommandName,1,PATINDEX('%[^(RE|ALL) ]%',CommandName)-1,'');
SELECT * FROM @Foo;Change the values in the sample table to some of your typical data and see if they all work correctly. If not, post the cases where they fail?