Advertisement
monsterherz

Untitled

May 21st, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. import re
  2. suchmuster="7sc"
  3. text="""Row9: invdec, 7sc. Repeat 2x
  4. Row10-Row11: 16sc
  5. Stuff the arms from time to time, not very
  6. tightly.
  7. Row12: invdec, 6sc. Repeat 2x (14)
  8. Row13-Row15: 14sc
  9. Row16: invdec, 5sc. Repeat 2x (12)
  10. Row17-Row19: 12sc
  11. Row20: 6invdec (6)
  12. Fix and leave the thread to sew the arms to the
  13. body."""
  14. gefunden = re.findall(suchmuster, text)
  15. if gefunden:
  16.                 for i in gefunden:
  17.                                 print(i, "wurde gefunden",)
  18. else:
  19.                 print ("Nix gefunden")
  20.  
  21. text.replace('7sc','7 fM')
  22. print (text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement