I have following string
hello[code:1], world [code:2], hello world
I want to replace this string to
hello <a href="someurl/1">someothercode</a>, world <a href="someurl/2">someothercode</a>, hello world
I want this String conversion using javascript reg ex
I tried
/\[code:(\d+)\]/
reg ex but not sure how to tokenize them
Does this fulfill your needs?