These are chat archives for LeoAref/RegularExpressions

6th
Mar 2016
Muhammad Aref
@LeoAref
Mar 06 2016 08:38
I have this text
p {
  font-size: 5px;
  padding: 7px;
  margin-top: 9px;
}

.myClass  {
  margin: 15px auto;
}

.myClass  { margin: 15px auto; }
and I'm trying to select css styles for .myClass selector, and my first try is \.myClass(\s+)?\{(.+)\}
$2 the second matching group here works only with the .myClass { margin: 15px auto; }, so how to make it works with multi-lines? to select:
.myClass  {
  margin: 15px auto;
}
Muhammad Aref
@LeoAref
Mar 06 2016 08:54
I successfully did that using \.myClass(.+)?\{(.+)?\n?(.+)\n?\}