sed wildcard substitution
问题 I want to do a substitution based on a wildcard. For example, change all "tenure" to "disposition" only if the word "tenure" comes after an '=' sign. Basically a regex that would match this =.*tenure The sed command that I have so for this is: sed 's/=.*tenure/=.*disposition/g' file.txt However, if I pass this to a file containing: blah blah blah = change "tenure" to "disposition" I get blah blah blah =.*disposition" to "disposition" instead of: blah blah blah = change "disposition" to