ya I fixed it in the second code.

^ is the beginning of a value @ was the searching value and \S+ is whatever is after value.