fork download
  1. import re
  2. p = re.compile(r'/\* *Custom-D Start *\*/\s*(.*?)/\* *Custom-D End *\*/', re.DOTALL)
  3. test_str = "/* Highlighting edits text on TIB ONLY and NOT ON PDF Output. \n .main-igp selector makes this style apply only for TIB. */\n.main-igp .edit1 {color: rgb(235, 127, 36)}\n.main-igp .edit2 {color: rgb(0, 0, 180);}\n/*Custom-D Start */\n.main-igp .edit3 {color: rgb(0, 180, 180);}\n.main-igp .edit6 {color: rgb(200, 200, 0);}\n/* Custom-D End */\n/* Production Note ===== */\np.production-note-rw {\n display: none;}\n/* Production Note END ===== */"
  4. m = p.search(test_str)
  5. if m:
  6. print(m.group(1))
Success #stdin #stdout 0.02s 9016KB
stdin
Standard input is empty
stdout
.main-igp .edit3 {color: rgb(0, 180, 180);}
.main-igp .edit6 {color: rgb(200, 200, 0);}