我不知道怎么做,所以我需要一些帮助,我正在处理一个文件,只需要提取这个文件的一些子字符串。每条线用分号分隔;我只需要第一个字段和另一个字段。类似的东西如下:
输入文件:
nakamed; ecd.bat ;\\DomainD\userhome_n\nakamed;"\\DomainD\userhome_n\nakamed";"\\serverfile66\userhome\nakamed";"Migrated from standalone DFS"
tanreka; ecd.bat serverfile60_D ;;
tayljka; ecd.bat ;\\DomainD\userhome_t\tayljka;"\\DomainD\userhome_t\tayljka";"\\serverfile47\userhome_d\tayljka";"Migrated from standalone DFS"
taylpoo; ecd.bat ;\\DomainD\userhome_t\taylpoo;"\\DomainD\userhome_t\taylpoo";"\\serverfile32\userhome\taylpoo";"Migrated from standalone DFS"
thomcet; ecd.bat ;\\DomainD\userhome_t\thomcet;"\\DomainD\userhome_t\thomcet";"\\serverfile32\userhome\thomcet";"Migrated from standalone DFS"
thomdop; ecd.bat ;\\DomainD\userhome_t\thomdop;"\\DomainD\userhome_t\thomdop";"\\serverfile66\userhome\thomdop";"Migrated from standalone DFS"
所需的输出文件:
nakamed; serverfile66
tanreka; serverfile60
tayljka; serverfile47
taylpoo; serverfile32
thomcet; serverfile32
thomdop; serverfile66