![]() |
PCDVD數位科技討論區
(https://www.pcdvd.com.tw/index.php)
- 七嘴八舌異言堂
(https://www.pcdvd.com.tw/forumdisplay.php?f=12)
- - 請問正則表示式(regular expression)能做到這樣嗎?
(https://www.pcdvd.com.tw/showthread.php?t=971492)
|
---|
引用:
vim都出來了∼ :eek: 果然藏龍臥虎啊∼∼∼ :ase |
regular : 正規
|
引用:
拜一下 真是UltraEdit之神 |
引用:
Find What: 3 Replace With: 0x3 Replace Where: Selected Text |
小菜一疊
用底下做搜尋 ^((0x..\s){3}) 並以底下全部取代之 \1\n 正則/正規化可好玩了~能做的事很多~ :ase PS.這是EmEditor的正規化做法 |
不好意思,又來請教大家了
<td class="MsgInstance" width="72%" colspan="2">[RESULT] Test=Luminance,Result=PASS,METRIC=LUMINANCE,Value=102,Expected=88-168,Bucketized_Error=0,Camera=USB2.0 Camera,Location=NotSet,Resolution=640x480,Lux=20<table width="100%"></table> 我手邊有份htm文件裡面有N行這樣類似的字串 我想把紅色的部分取出來 Value=,102,Expected=,88-168,Resolution=,640x480,Lux=,20 我目前使用ultraedit的perl replace 代碼:
replace what ([^()]),Value=([^()]),Expected=([^()]),([^()]),Resolution=([^()]),Lux=([^()]),([^()]) 代碼:
replace with Value=,\2,Expected=,\3.Resolution=,\5,Lux=,\6 但是一直抓不到匹配的字串,請問有沒有大師幫我解惑 或是除了ultraedit外請問sed或是有沒有其他的工具能夠辦用正則表示到把上面字串取出:) |
引用:
echo "0x00 0x00 0x08 0x00 0x02 0x00 0x04 0x00 0x02 0xFF 0x00 0xFF 0x02 0x07 0x88 0x02 0x09" |xargs -n3 |
引用:
(Value|Expected|Resolution|Lux)=([\w-]+)[\s,]* test tool: expresso |
引用:
誰來解釋一下這是什麼語言? 誰發明的? 最初在perl使用還是php?還是java? |
引用:
科學始於數學...:stupefy:.. http://zh.wikipedia.org/wiki/%E6%AD...%BE%BE%E5%BC%8F 這東西很好用....:flash:.. |
所有的時間均為GMT +8。 現在的時間是11:48 PM. |
vBulletin Version 3.0.1
powered_by_vbulletin 2025。