using sed to replace whole word containing '='?

Posted by rashid on Stack Overflow See other posts from Stack Overflow or by rashid
Published on 2010-03-26T21:13:58Z Indexed on 2010/03/26 21:23 UTC
Read the original article Hit count: 113

Filed under:
|

EDIT
i have something like this in a file:
imagecolor=0
arrayimagecolorcopy=0
arrayimagecolorcopy3d=0

when i use sed -i -e 's/imagecolor=0/imagecolor=1/' it will change 1 and 2 line. But i only want it to replace first line.
i also tried sed with \< \ > and \b \b, but no luck. Could it be the '=' sign? Do we have something like -w as in grep command?

Thank you.

© Stack Overflow or respective owner

Related posts about sed

Related posts about regex