worked on regex in pwin.cpp