作者TonyQ (骨头)
站内java
标题regex的问题..
时间Wed Apr 18 21:51:19 2007
我碰到一个极度棘手的问题
底下是我的资料 (在日期 tag之後) 整篇是一个String,
我的问题是,我用 比方说 ".+" 做 matches()的比对
竟然回传 false T_____T
搞了半天 regex怎麽查就是任意字元,後来想到要查API已经一小时过去了,
Any character (may or may not match line terminators)
(翻桌!)
提醒有在用的人 偶尔还是要注意一下换行字元(泪)
要换行的话要改成 MULTILINE
http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html#MULTILINE
--
站内
unknown site:wretch
===Wed Apr 18 21:21:12 CST 2007==
【看板列表】 邮差来按铃了! 看板《尚未选定》
[←]离开 [→]阅读 [c]篇数 [S]排序 [v]已读 [/]搜寻 [a]加入最爱 [h]说明
总数 看 板 中 文 叙 述 赌投人 板 主
1526‧ Story 文学 Story全国故事连线板 69 flyviolet/zyp
2434‧ FTP 电脑 FTP技术交流 59 wubm
8867‧ nctu.teacher NCTU 交大选课指南 48 walkers/goldm
3010‧ HsinChu.sale 地方 新竹‧二手买卖‧请详阅板规 36 blockhead
4166‧ SD_fay88 濯梦 【夏霏】一百个幸福接力 35 fay88/Kooroan
5432‧ Joke 休闲 joke 34 player/justin
--
I am a person, and I am always thinking .
Thinking in love , Thinking in life ,
Thinking in why , Thinking in worth.
I can't believe any of what ,
I am just thinking then thinking ,
but worst of all , most of mine is thinking not actioning...
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.134.27.68
※ 编辑: TonyQ 来自: 220.134.27.68 (04/18 21:52)