How can I can not find a user with spaces in their names?
I try to search user:"Nam Gi VU" But I got no results, how can开发者_如何学运维 I search using this name? (The name can be any names, I just get my name as an example.
I'm going to go out on a limb here since you haven't specified a lot about the environment.
If you're running on a UNIXy-type box, you can simply use something like:
egrep -i '^nam +gi +vu$' /path/to/usernames.txt
The +
indicates one or more of the preceding character so it will find the words nam
, gi
and vu
with spaces between them (the -i
means ignore case).
If you're allowed to have spaces at the start and end, use:
egrep -i '^ *nam +gi +vu *$' /path/to/usernames.txt
(*
means zero or more of the preceding character).
If you have a more advanced regex tool, you can use \s
for white space and \b
for word boundaries.
精彩评论