Regular expression problem

string=“something somethig something”

now i want to change /<a.*a>/ to “tag”
i want result like this

string=“something tag somethig tag something”

but when i try

string =~ /<a.*a>/ # here $& —>" somethig "
$`+‘tag’+$’ # ‘something tag something’

how can i change each tag ?

any idea ?

From: [email protected] [mailto:[email protected]]

string=“something somethig something”

now i want to change /<a.*a>/ to “tag”

i want result like this

string=“something tag somethig tag something”

:008:0> string=“something somethig something”
=> “something
somethig something”
:009:0> string.gsub(/<a.*?a>/,‘tag’)
=> “something tag somethig tag something”

kind regards -botp

Peña, Botp wrote:

:009:0> string.gsub(/<a.*?a>/,‘tag’)
=> “something tag somethig tag something”

kind regards -botp

thanks