fork download
  1. import re
  2. pkgLogExtract = """
  3. test v1.0.1
  4. nothing
  5. test v1.0
  6. out
  7. in
  8. flip
  9. """
  10.  
  11. print (re.sub(r'^test v1\.0$', "ngn", pkgLogExtract, 1, flags=re.M))
Success #stdin #stdout 0.01s 8968KB
stdin
Standard input is empty
stdout
test v1.0.1
nothing
ngn
out
in
flip