Groovy String replace

У меня есть строка в следующем формате

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

, теперь я хочу, чтобы эта строка была в

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

, поэтому в основном нужно заменить @ [Some name] (контакт: id) для URL-адреса с помощью groovy и с помощью reg ex, как это эффективно сделать

7
задан jamesallman 4 February 2012 в 16:45
поделиться