finding pattern without grep in unix

how can i find related pattern in a text file without using grep command in unix

You can for example use sed and awk (or nawk if on solaris)

you may use Perl or Python as well