N
Nanyang Zhan
Hi, Could anyone tell me how to generate regexp pattern from strings?
for example, how to code the return_pattern(str) method?
thanks!
str = "^test|production-(\\d+)"
return_pattern(str) ===> /^test|production-(\d+)/
def return_pattern(str)
?????????????????
end
for example, how to code the return_pattern(str) method?
thanks!
str = "^test|production-(\\d+)"
return_pattern(str) ===> /^test|production-(\d+)/
def return_pattern(str)
?????????????????
end