You did not mention the programming language, but in the general case, assuming that the language s /// is of type regexp syntax in some way:
s/@\[([^\]]+)\]\([^:]+:([0-9]+)\)/<a href="someurl\/$2">$1<\/a>/g
This will work in most regular expression languages. For example, it works in perl (although I avoid the special @ symbol, which means something in perl:
#echo "some other string @[Foo Foo](contact:2) some other string @[Bar Bar](contact:1) still some other string" | perl -p -e 's/\@\[([^\]]+)\]\([^:]+:([0-9]+)\)/<a href="someurl\/$2">$1<\/a>/g' some other string <a href="someurl/2">Foo Foo</a> some other string <a href="someurl/1">Bar Bar</a> still some other string
Wes hardaker
source share