こんにちわ。いわさき @twtrfk です。
とりあえず必要な
Regex.java
Extractor.java
regex.Spaces.java
だけ組み込んで動かしてみたのですが、
テストで想定している挙動と違うケースがあるようです。
例えば
- description: "DO NOT extract username preceded by !"
text: "f!@kn"
expected: []
- description: "DO NOT extract username preceded by @"
text: "f@@kn"
expected: []
- description: "DO NOT extract username preceded by #"
text: "f#@kn"
expected: []
- description: "DO NOT extract username preceded by $"
text: "f$@kn"
expected: []
- description: "DO NOT extract username preceded by %"
text: "f%@kn"
expected: []
- description: "DO NOT extract username preceded by &"
text: "f&@kn"
expected: []
- description: "DO NOT extract username preceded by *"
text: "f*@kn"
expected: []
の場合、テストでは全てのケースでスクリーン名と認識されないハズなのですが、
実際に動かすと全てのケースでknがスクリーン名として認識されました。
さらに、実際の
www.Twitter.com上の挙動は
f&@kn
だけ、スクリーン名として認識されています。
公開されているライブラリ(正規表現)は、実際にTwitterで採用されているものと差があると言う認識でいいのでしょうか?
その場合、差分がどの程度かがわかる情報はあるのでしょうか?
以上、宜しくお願いします。