//校验手机号 function IsMobileNumber( num:string ):boolean; begin Result:=False; if length( trim( Num ) ) <> 11 then Exit; if ( ( copy( num, 1, 2) <> '13' ) and ( copy( num , 1, 2) <> '15' ) ) then Exit; try StrToInt(
Given a text file file.txt that contains list of phone numbers (one per line), write a one liner bash script to print all valid phone numbers. You may assume that a valid phone number must appear in one of the following two formats: (xxx) xxx-xxxx or