I'm not very good on regex, I need to search for
<anyword/> and repace with <anyword></anyword>
Like <book/> to <book></book>
It sounds like you're trying to parse XML with regexes, which is usually a bad idea — XML is much more complicated than it may initially seem (what happens when you need to replace <a b="c"/> with <a b="c"></a>? what about non-ASCII element names?) — but if you're certain that what you've described is exactly what you need, then you can write:
perl -pe 's{<(\w+)/>}{<$1></$1>}g' < input_file > output_file
or:
sed 's|<\([^[:space:]][^[:space:]]*\)/>|<\1></\1>|g' < input_file > output_file
[:space:] check... also I'm sure that the file I need to edit has only the <name /> or <name>value</name> tags...Use
sed -i 's|<\([[:alpha:]][[:alpha:]]*\)/>|<\1></\1>|g' $input_file
to change the file in-line (that's what the -i is for). Careful: The -i is a GNU extension.
To be POSIX compliant and edit the file inline (on any *IX system), use this:
echo '/<[[:alpha:]][[:alpha:]]*\/>/g\
s/<\([[:alpha:]][[:alpha:]]*\)\/>/<\1><\/\1>/g
wq' | ed $input_file
See the POSIX standard on sed, ed, and regular expressions.