How can expect match the pattern "$", instead of take it as a wild card

I am writing a expect script. during the expect, i need check the out to see whether i logged in:

set password "1234"

spawn telnet host1
expect "login:"
send "guest\n"
expect "password:"
send $password
expect -re "#|$"
puts "Logged in"

But it seems that expect takes "$" as a wild card and match it to everything.

Is there a way to tell expect take the "$" literally?

Thanks in adv

something like this '$'.

Not quite get your point.

I enabled the exp_internal and updated the line with:

expect -re "#|'$'"

The output is:
Last login: Mon Nov 9 13:21:06 from host1
Sun Microsystems Inc. SunOS 5.10 Generic January 2005

expect: does " \r\nLast login: Mon Nov 9 13:21:06 from host1\r\nSun Microsystems Inc. SunOS 5.10 Generic January 2005\r\n" (spawn_id exp7) match regular expression "#|'$'"? no
$
expect: does " \r\nLast login: Mon Nov 9 13:21:06 from zcyds232.asiapa\r\nSun Microsystems Inc. SunOS 5.10 Generic January 2005\r\n$ " (spawn_id exp7) match regular expression "#|'$'"? no
expect: timed out
faxstat: Timed out after 5 seconds.

Although the "$" is shown in the telnet output....but the script doesn't match it...

also tried:

expect -re '$'

doesn't work either

I never used "expect" , let me check if i found any i will let u know.