modularity and regular expressions