Critical bug fix about TP always Closed

Their was a bug while matching regexp