Skip to content

Instantly share code, notes, and snippets.

@FloydHsiu
Created April 22, 2016 09:27
Show Gist options
  • Save FloydHsiu/5321ddf296111e85606fff293f006323 to your computer and use it in GitHub Desktop.
Save FloydHsiu/5321ddf296111e85606fff293f006323 to your computer and use it in GitHub Desktop.
宣告某token xyz++ 在讀的時候只會讀到xyz就會印出找到該token
解決方式
1.使用 xyz”++” or “xyz++”
2.使用 xyz\+\+
[abc] 表示只要符合abc其中之一
[a-z0-9<>_] 表示a~z, 0~9 , <, >, _ 其中之一符合就可
但因為有a-z這種表示方式,所以導致如果要當 “-“也列入考量
“-“必須擺在最一開始或最後, Ex: [-+0-9]
[^abc] 表示符合 非a, b, c
ab?c 表示 ?前的character可有可無 —> ac, abc都可
a* 表示接受所有 空, a, aa, aaa, aaaa, ……..
a+ 表示接受所有 a, aa, aaa, aaaa, …….(沒有空)
ab | cd 表示接受 ab, cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment