Difference between revisions of "ScriptCore3.SplitRegExpr"
(new page) |
(No difference)
|
Latest revision as of 13:21, 25 August 2013
procedure SplitRegExpr (const ARegExpr, AInputStr: string; APieces : TStrings); ARegExpr: regular expression AInputStr: string to be split APieces: result of split as TStrings
Description
Split AInputStr into APieces by r.e. ARegExpr occurencies
For detailed information about Regular Expressions see Regular_Expression on Wikipedia
Example
const
Reg = 'line';
Str = '0line1line2line3line4';
var
Res: TStringList;
begin
Res := File.CreateStringList;
SplitRegExpr(Reg,Str,Res);
WriteLn(Res.Text);
{
0
1
2
3
4
}
Res.Free;
end.