14.01.2011, 12:56
So recently because of my scripting error some files were written wrong and now i want to fix that.
Here's an example of my file (it doesn't look like this, it's just a example):
So what i want to do is, to extract all the red parts in the file (there's over 500, so it's hard to do it manualy).
What i know is this, every part that i need to extract starts with "user- and the rest is the username ended by a ".
I tryed something with strcmp, strfind etc. but i failed.
Could somebody please write me some code that could do this? Thank you.
Here's an example of my file (it doesn't look like this, it's just a example):
Quote:
947tz47gz47zh7gz897ghguiohubhjgbejjcujeuefguef7gf7 3tg7tg37gf73gf73g7gg rgz3grf783gf783gh7f3ghgh378gh3gh3g3hg8h3g783hg783h g3 3g3hh37hg73hg73hg7h37gh3gh3hg73hg7h37h37hg73hg73hg 7h37gh37gh73hg73hg g3g33gg 378h373h7hg7gh73gh7g3h73gh3g7h3g3 3g3gg3hg3hg73hg7h3g7h37gh37h3g73gh73g7"user-someusername"h7fg3g73ghf73g73gb73g37gh3g7 3g3hh37hg73hg73hg7h37gh3gh3hg73hg7h37h37hg73hg73hg 7h37gh37gh73hg73hg g3g33gg 378h373h7hg7gh73gh7g3h73gh3g7h3g3 3g3gg3hg3hg73hg7h3g7h37gh37h3g73gh73g7"user-someusername"h7fg3g73ghf73g73gb73g37gh3g7 rgz3grf783gf783gh7f3ghgh378gh3gh3g3hg8h3g783hg783h g3 3g3hh37hg73hg73hg7h37gh3gh3hg73hg7h37h37hg73hg73hg 7h37gh37gh73hg73hg g3g33gg 378h373h7hg7gh73gh7g3h73gh3g7h3g3 |
What i know is this, every part that i need to extract starts with "user- and the rest is the username ended by a ".
I tryed something with strcmp, strfind etc. but i failed.
Could somebody please write me some code that could do this? Thank you.