[返回电脑前线首页]·[所有跟帖]·[ 回复本帖 ] ·[热门原创] ·[繁體閱讀]·[版主管理]
Need some regexp help
送交者: abcd1234[☆品衔R3☆] 于 2015-04-04 22:38 已读 267 次  

abcd1234的个人频道

各位大虾好!

我需要 regexp 方面的一些帮助。
refind("[[:space:]]", str)
will find all the text in the var of the str and to exclude HTML code.
What I need is to include the following three sets of special characters:
nr  // for new line and carriage return, want to retain them 
:  // I want to keep this special character in the text returned as well
-- //  I want to keep this special character in the text returned as well

The following attempt did not work.
refind("(nr|:|--|[[:space:]])", str)

Please advise.   请帮忙。

多谢。


喜欢abcd1234朋友的这个贴子的话, 请点这里投票,“赞”助支持!
[举报反馈]·[ abcd1234的个人频道 ]·[-->>参与评论回复]·[用户前期主贴]·[手机扫描浏览分享]·[返回电脑前线首页]
帖子内容是网友自行贴上分享,如果您认为其中内容违规或者侵犯了您的权益,请与我们联系,我们核实后会第一时间删除。

所有跟帖:        ( 主贴楼主有权删除不文明回复,拉黑不受欢迎的用户 )


    用户名:密码:[--注册ID--]

    标 题:

    粗体 斜体 下划线 居中 插入图片插入图片 插入Flash插入Flash动画


         图片上传  Youtube代码器  预览辅助

    手机扫描进入,浏览分享更畅快!

    楼主本栏目热帖推荐:

    >>>>查看更多楼主社区动态...






    [ 留园条例 ] [ 广告服务 ] [ 联系我们 ] [ 个人帐户 ] [ 版主申请 ] [ Contact us ]