regularities detection