1
我正在使用的sscanfsscanf的正則表達式與匹配甚至是空字符串
sscanf($seat, "%d-%[^(](%[^@]@%[^)])");
這個表達式,而且運作良好時,我得到這樣的字符串: 173-9B([email protected] [email protected])
但是當我得到這個一種字符串: 173-9B(@3.14 [email protected])
這一切都搞砸了,我怎麼也接受第一(
和第一@
之間空字符串?
使用sscanf而不是'preg_match'的任何原因? – anubhava
@anubhava不是特別的,只是對我來說更方便。 – Dano