我試圖匹配以下的東西。正則表達式匹配數字的組合,但shuoldn't匹配一些其他模式
10/1987 - 10/1987
2/1987 - 12/1987
More clearly:
["one" or "two digit"]["any symbol mainly [/-]][a space if there followed by slash or hiphen [-/]["one" or "two digit"]["any symbol mainly [/-]]
這是我有的輸出。
https://regex101.com/r/cN9eJ0/1
@vks - 只需在右側框中添加gmi即可。更新的鏈接是https://regex101.com/r/cN9eJ0/2 – user3116355 2015-02-09 09:28:09