# coding=utf8
# the above tag defines encoding for this document and is for Python 2.x compatibility
import re
regex = r"\S.\w+"
test_str = ("3 \n"
" behnnam 12 157 282 55 308 159 \n"
"4 \n"
" qmohu 12 035 048 112 050 92 \n"
"5 \n"
" yufi71 4 637 190 66 488 366 \n"
"6 \n"
" Rohirrim_16 3 026 111 88 140 500 \n"
"7 \n"
" Nelliell 2 408 324 37 561 322 \n"
"8 \n"
" Knighteer 2 225 014 111 877 445 \n"
"9 \n"
" -suvari- 2 200 538 96 095 498 \n"
"10 \n"
" farukcakir 1 896 439 47 117 173 \n"
"11 \n"
" bobo342 1 767 789 133 470 479 \n"
"12 \n"
" Nawaf2u 1 701 184 11 020 171 \n"
"13 \n"
" korkuteke 1 646 584 18 821 376 \n"
"14 \n"
" aslkrslan 1 213 415 3 451 204 \n"
"15 \n"
" cinek31 1 157 463 7 912 230 \n"
"16 \n"
" 61pusat61 1 152 810 17 215 104 \n"
"17 \n"
" sladdin 1 031 630 19 556 312 \n"
"18 \n"
" devilsblade 908 424 37 133 375 \n"
"19 \n"
" krzychu4321 869 630 45 454 475 \n"
"20 \n"
" lacivertly1 868 405 30 795 457 \n"
"21 \n"
" orklar-tr 635 614 9 142 449 \n"
"22 \n"
" Doganbey1993 623 343 9 409 62 \n"
"23 \n"
" eagle_37800 592 185 25 424 389 \n"
"24 \n"
" cavidov 570 925 37 045 79 \n"
"25 \n"
" mbardakci 541 223 9 903 169 \n"
"26 \n"
" karasahin55tr 538 393 19 545 291 \n"
"27 \n"
" salvatordemon 517 475 2 248 127 \n"
"28 \n"
" secooooooo 401 102 12 641 236 \n"
"29 \n"
" synfrkn 360 119 14 243 375 \n"
"30 \n"
" gingso 218 393 5 373 355 \n")
subst = ""
# You can manually specify the number of replacements by changing the 4th argument
result = re.sub(regex, subst, test_str, 0, re.MULTILINE)
if result:
print (result)
# Note: for Python 2.7 compatibility, use ur"" to prefix the regex and u"" to prefix the test string and substitution.
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 Python, please visit: https://docs.python.org/3/library/re.html