Possible Duplicate:
Alternative to regex: match all instances not inside quotes
I need to be able to replace all occurrence of a word other than those present in single quotes. for example, input string is
insert into Tbale(spname,id,date)values('sp_List ','Date','01/01/2011')
exec sp_List
Replacement string for sp_list is DBobject, output should look like
insert into Tbale(spname,id,date)values('sp_List ','Date','01/01/2011')
exec DBobject
what regex expression should i use?