Sed scripting, match text within line and replace

New to sed...
Have a file foo.txt (below).
Need to replace text on 2 lines, but can only feed sed the first few characters of each line (all lines are unique).
So, in my example, I have put '$' in place of what I need to figure out how to feed the whole line.

What I have thus far:

sed -e 's/LA$/LA=2345/g' -e 's/LA1$/LA1=7789' foo.txt

foo.txt:

LA=1234
LA1=23456
LA2=1987

Thanks, this board is wonderful.
Yes, I do search before posting.

---------- Post updated at 06:24 PM ---------- Previous update was at 06:12 PM ----------

May have answered my own question...

sed -e 's/LA=[a-zA-Z0-9]/LA=2345/g' -e 's/LA1=[a-zA-Z0-9]
/LA1=7789' foo.txt

Best way?

May be characters after, so that is why I did the a-z and A-Z.

(Ignore)

If I understood you, I think you are trying to do this:

sed -e 's/LA=[[:alnum:]]*/LA=2345/'  -e 's/LA1=[[:alnum:]]*/LA1=7789/'

Perfect, thank you!

Sorry, I forgot. One minor change:

sed -e 's/^LA=[[:alnum:]]*/LA=2345/'  -e 's/^LA1=[[:alnum:]]*/LA1=7789/'

Any idea what I am doing wrong here?

Getting these errors:
unexpected EOF while looking for matching `"'
syntax error: unexpected end of file

THUMB=123
THUMB1=234

for file in `echo /etc/files/files/*`	
do
sed -e 's/^LA=[[:alnum:]]*/$THUMB/' -e 's/^LA1=[[:alnum:]]*/$THUMB1/' $file
done

Try:

for file in /etc/files/files/*