Valid Phone Numbers
2015-07-11 13:26
302 查看
https://leetcode.com/problems/valid-phone-numbers/
# Read from the file file.txt and output all valid phone numbers to stdout.
awk '/^([0-9]{3}-|\([0-9]{3}\) )[0-9]{3}-[0-9]{4}$/{print $0}' file.txt
# Read from the file file.txt and output all valid phone numbers to stdout.
awk '/^([0-9]{3}-|\([0-9]{3}\) )[0-9]{3}-[0-9]{4}$/{print $0}' file.txt
相关文章推荐
- 怎么样 javascript / js 在 建立map
- POJ 1328
- commons-logging log4j slf4j logback
- linux下各种格式软件包的安装
- 线程、进程间通信
- sql中Distinct&Count的用法
- Direct-X学习笔记--纹理映射
- 自己的包poi操作Excel工具
- C语言中给数组赋随机值
- 制表回车换行符
- git使用详解
- LeetCode题解——9Palindrome Number
- openStack动态迁移
- 经常使用vi编辑命令
- sqlserver使用户只能在某个架构下建立表和存储过程
- Nginx写IO占用高故障处理
- GSM tutorial
- Sqlmap渗透测试是常用语句
- 广播、多播、UNIX套接域
- Spring学习(23)--- AOP之Introductions应用