2012-05-13 82 views
-1

我正在使用VB 2010和正則表達式在HTML塊中查找「[number]/[number]」模式的文本。我應該使用哪種正則表達式搜索模式?謝謝 !正則表達式搜索字符串,如「150/2」

+0

月數是負的?十六進制?浮點?科學計數法?八?領先的零? –

+0

[3位數+ ve數字]/[2位數+ ve數字必須小於11] – antikbd

回答

1
(\d+)\s*\/\s*(\d+) 

說明:

(\d+): One or more digits. Captured in first group. 
\s* : Zero or more space like chars 
\/ : The `/`. Escaped. 
\s* : Zero or more space like chars 
(\d+): One or more digits. Captured in second group. 
+0

謝謝......完美無缺! – antikbd

相關問題