DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR SHELL
Using sed to find and replace complex string (preferrably with regex)
sed -i -E "s/(<username>.+)name(.+</username>)/1something2/" file.xml
Source by unix.stackexchange.com #
PREVIOUS
NEXT
Tagged:
#Using
#sed
#find
#replace
#complex
#string
ADD COMMENT
Topic
COMMENT
Name
4+2 =
Submit