Fix regex for resources lookup, use ResourcesScanner.

Signed-off-by: Robert Xu <robxu9@gmail.com>