re = /\:(\s)?(.+)[^\{](\v)/
str = '#main h1 {
color: #333;
}
a {
text-decoration: none;
color: #333;
}
a:hover {
text-decoration: underline;
}
body {
margin: 0;
display: table-row;
/*vertical-align: middle;
filter: url(#blur);
background: url(\'bg.jpg\') center top no-repeat #333;
background-clip: cover;
-moz-filter: blur(20px);*/
position: relative;
}
body::before {
content:\'\';
background: url(\'bg.jpg\') center top no-repeat #333;
background-clip:cover;
background-attachment: fixed;
position: absolute;
top: 0; bottom: 0; left: 0; right: 0;
height: 100%;
width: 100%;
filter: url(#blur);
filter: blur(2px);
-webkit-filter: blur(2px);
z-index: -1;
}'
# 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