How to filter out lines from a variable that has multi-lines?



suppose a variable $a has multi-lines, e.g.

happy
new
new password
year
get password of micky
LOL

What is best way to filter out lines that have "password" involved?
Thanks in advance

.