[liujing] replace regex with method.