Groovy Chaîne de remplacement

J'ai de la chaîne dans le format suivant

some other string @[Foo Foo](contact:2) some other string @[Bar Bar](contact:1) still some other string

maintenant, je veux cette chaîne en

some other string <a href="someurl/2">Foo Foo</a> some other string <a href="someurl/1">Bar Bar</a> still some other string

donc, fondamentalement besoin pour remplacer la @[Some name](contact:id)d'url à l'aide de groovy &utilisation reg ex qu'est-ce que la façon efficace de le faire

OriginalL'auteur user602865 | 2012-02-04