[tests] enhance matching pattern (#4629)
[tests] enhance matching pattern (#4629)

This commit enhances the way to match patterns during tests, so that
it can also support with readline enabled.
lanyuwen/openthread,jwhui/openthread,lanyuwen/openthread,librasungirl/openthread,abtink/openthread,lanyuwen/openthread,librasungirl/openthread,openthread/openthread,openthread/openthread,abtink/openthread,jwhui/openthread,librasungirl/openthread,lanyuwen/openthread,jwhui/openthread,abtink/openthread,srickardti/openthread,chshu/openthread,chshu/openthread,librasungirl/openthread,jwhui/openthread,openthread/openthread,bukepo/openthread,chshu/openthread,srickardti/openthread,bukepo/openthread,abtink/openthread,srickardti/openthread,chshu/openthread,chshu/openthread,bukepo/openthread,srickardti/openthread,bukepo/openthread,lanyuwen/openthread,lanyuwen/openthread,openthread/openthread,chshu/openthread