Regex NOT EQUAL help

I have the following line to text:

ExecuteQueue Name=default ThreadCount=60

I want to write a sed or awk function that eliminates everything before "ThreadCount" without taking into account what is actually in front of ThreadCount. Meaning there may be text in front of "ThreadCount" other than what is currently in front of it now. Basically I am looking for a delete everything NOT EQUAL to <STRING> and I cant seem to find anything like that in any sed documentation.

echo 'ExecuteQueue Name=default ThreadCount=60' | sed 's/.*\(ThreadCount.*\)/\1/'

Youhave to delete from the start of the line up to ThreadCount

sed 's/^.*ThreadCount/ThreadCount/'  filename > newfile

Awesome vgersh99, you are my hero! If you have a second, could you explain to me how that is working? Im a sed newb (awk & sed book is in the mail).

---------- Post updated at 03:57 PM ---------- Previous update was at 03:55 PM ----------

Jim yours works as well, thank you very much

sed 's/.*\(ThreadCount.*\)/\1/'

.* - match any (.) character repeated 0 or more times (*) - sed's regex-s are 'greedy' - therefore it 'grabs' as many characters as possible.

followed by a 'capture' '\(ThreadCount.\) - capture of 'ThreadCount' followed by any char (.) repeated 0 or more times () - in effect captures everything till the end of the line.

\1 - output the FIRST 'capture'.

HTH

Makes sense. Thanks again

If you are not very familiar with regular expressions (or even if you are), I'd recommend this site:

RegExr: Online Regular Expression Testing Tool

Gives you the opportunity to see the result of your reg exp, as well as explains what each part of the reg exp is doing