pgrep/pidof usage for complex process names?

Solution 1:

$ ps aux |grep [d]evio
user01   10220  0.0  0.1   5376  2424 pts/5    S+   11:41   0:00 ssh devio
$ pgrep -f "ssh devio"
10220
$ pkill -0 -f "ssh devio" ; echo $?
0