re = /(?=.*\d+)(?=.*[\pL\pM\p{P}\p{S}]+)[\pL\pM\d\p{P}\p{S}]{6,}/
str = '1Ki77y
.Susan53
jelly22fi$h
$m3llycat
a11Black$
!ush3r
&ebay.44
d3ltagamm@
!Lov3MyPiano
SterlingGmail20.15
BankLogin!3
اللغ٦٧
تال@#٦٧
ोे््््ॅऍॅ्र12
±±§§§§§§§§§'
# Print the match result
str.scan(re) do |match|
puts match.to_s
end
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Ruby, please visit: http://ruby-doc.org/core-2.2.0/Regexp.html