If you want to add text at the _beginning_ of the line, you have to match all the characters from the beginning of the line:
regsub {^.*pch_mac} $file_pointer {*&} file_pointer
Here, `&` in the replacement part is substituted with all the text that matched the expression, i.e. all the chars from the beginning of the line to "pch_mac". See <
Perl uses the `$1` notation, Tcl uses `\1` **if** you use capturing parentheses:
regsub {^(.*pch_mac)} $file_pointer {*\1} file_pointer
Another way to write this is
if {[string first pch_mac $file_pointer] != -1} {
set file_pointer "*$file_pointer"
}