A {\it pattern} is a string of constants and variables, and is {\it regular} if each variable occurs in the pattern at most once. The present paper deals with the problem of learning languages generated by regular patterns with two kinds of variables, {\it erasing} and {\it nonerasing} from positive examples within Gold's model. First, we show an equivalence theorem of a semantic containment $L(p) \subseteq L(q)$ and a syntactic containment $p \preceq q$ for regular patterns $p$ and $q$. Then we show that the class of regular pattern languages is polynomial time inferable from positive examples.