码迷,mamicode.com
首页 > 编程语言 > 详细

匹配 C 语言样式字符串

时间:2014-10-29 16:53:53      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:style   blog   io   color   ar   sp   div   log   bs   

 1 #include <stdio.h>
 2 
 3 char haha[] = "nihaoma"
 4               "niubi"
 5                "\"hello world\n\"";
 6 int main(void)
 7 {
 8     printf("%s\n", haha);
 9     return 0;
10 }

匹配的正则表达式如下

(("(\\.|[^"])*")\s*)+

 

匹配 C 语言样式字符串

标签:style   blog   io   color   ar   sp   div   log   bs   

原文地址:http://www.cnblogs.com/wendellyi/p/4059773.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!