'fz 昭和十七年十二版  282頁  808598  840730'
bl:='808598  840730'
for i=1 to len(bl) do
   if bl[i]='0...9' then

解决方案 »

  1.   

    使用pos()定位函数找到你要提取的字符串,在用copy()函数将其记录下来就可以了。
      

  2.   

    s:='fz 昭和十七年十二版  282頁  808598  840730';
    ss:='';
    for i:=1 to length(s)
     if s[i] in ['0'..'9'] then ss:=ss+s[i];这只是个思路
    具体的按空格进行分割就由你自己实现了
      

  3.   

    以下是一个解析字符串的例程,可以解析以空格、TAB健、以及逗号分割的字符串。返回值:含有的字符串数量,和各个字符串。希望对你有用procedure jiexi_str(s: string; var cc : integer; var sarr : array of string);
    var
       i, j : integer;
       cci : integer;
       temp : array[1..100] of char;
    begin
       i:=1;
       cc :=0;  //sarr 序号
       cci := 0;  //sarr[i]的下标
       while i<=length(s) do
       begin
          if (s[i] =' ') or  (s[i]=#9)  or  (s[i]=',') then
          begin
             setlength(sarr[cc], cci);
             for j := 1 to cci do
                sarr[cc][j] := temp[j];
             for j:= 1 to 100 do       temp[j] := #0;         inc(cc);
             cci := 0;
             inc(i);
             while s[i]=' ' do inc(i);
             if i>length(s) then break;
          end
          else
          if (s[i] <>' ') and  (s[i]<>#9)  and (s[i]<>',') then
          begin
             inc(cci);
             temp[cci] := s[i];
             inc(i);
          end
       end;
    end;