The algorithm is given for deciding whether a string s is a substring of the string which is in a regular language L. That also means assuming s is a string over 2, L is a regular language over 2. s is a substring of the string in L, if and only if s is a substring of the string which belongs to the set Vn= {w∈∑ |w∈L, |w|≤2n+k-2} where k =| s | , n is a nature number.