Unfortunately there is no native support for regular expressions in T-SQL. There are CLR implementations of regex replace etc. on the web - for example see hereFor the example you posted, the following (which uses only native T-SQL functions) should workDECLARE @x VARCHAR(255) = 'THIS,IS -12345(abcdefg,DataSource=TheServerName101;XXXLAKSDJNFKAICNCW)';SELECT LEFT(STUFF(@x,1,10+CHARINDEX('DataSource=',@x),''),CHARINDEX(';',STUFF(@x,1,10+CHARINDEX('DataSource=',@x),''))-1);