Hi All,
I have a text file which has a content like this:
network: Connecting with proxy=DIRECT
[09 Nov 2011 06:10:57.994] New imageNo= 0 mailPieceId= null imageLen= 0
[09 Nov 2011 06:10:57.994] imageInfo=null
[09 Nov 2011 06:10:58.510] requestGET =
[09 Nov 2011 06:10:58.510] connecting to the servlet...
network: Connecting with proxy=DIRECT
[09 Nov 2011 06:10:58.760] New imageNo= 0 mailPieceId= null imageLen= 0
[09 Nov 2011 06:10:58.760] imageInfo=null
[09 Nov 2011 06:10:59.276] requestGET =
[09 Nov 2011 06:10:59.276] connecting to the servlet...
network: Connecting with proxy=DIRECT
[09 Nov 2011 06:10:59.511] New imageNo= 0 mailPieceId= null imageLen= 0
[09 Nov 2011 06:10:59.511] imageInfo=null
[09 Nov 2011 06:11:00.027] requestGET =
[09 Nov 2011 06:11:00.027] connecting to the servlet...
network: Connecting with proxy=DIRECT
[09 Nov 2011 07:39:56.403] New imageNo= 0 mailPieceId= TPP;UT2;PAR;PRO;2011;11;09;00;39;18;349;002;0000000232 imageLen= 0
[09 Nov 2011 07:39:56.403] imageInfo=null
[09 Nov 2011 07:39:56.918] requestGET =
[09 Nov 2011 07:39:56.918] connecting to the servlet...
network: Connecting with proxy=DIRECT
[09 Nov 2011 07:39:57.152] New imageNo= 0 mailPieceId= TPP;UT2;PAR;PRO;2011;11;09;00;39;18;349;002;0000000232 imageLen= 0
[09 Nov 2011 07:39:57.152] imageInfo=null
[09 Nov 2011 07:39:57.666] requestGET =
[09 Nov 2011 07:39:57.666] connecting to the servlet...
network: Connecting with proxy=DIRECT
[09 Nov 2011 07:39:57.900] New imageNo= 0 mailPieceId= TPP;UT2;PAR;PRO;2011;11;09;00;39;18;349;002;0000000232 imageLen= 0
[09 Nov 2011 07:39:57.900] imageInfo=null
[09 Nov 2011 07:39:58.415] requestGET =
[09 Nov 2011 07:39:58.415] connecting to the servlet...
network: Connecting with proxy=DIRECT
[09 Nov 2011 07:39:58.649] New imageNo= 0 mailPieceId= TPP;UT2;PAR;PRO;2011;11;09;00;39;18;349;002;0000000232 imageLen= 0
[09 Nov 2011 07:39:58.649] imageInfo=null
[09 Nov 2011 07:39:59.164] requestGET =
[09 Nov 2011 07:39:59.164] connecting to the servlet...
I want to find this line:
network: Connecting But as you can see from the source above, it has two tasks:
network: Connecting with proxy=DIRECT
and
network: Connecting with proxy=DIRECT
Now my question is, is it possible to extract the contents of the source file, base on the found string? Some sort of boundary.
To make it simple, the output should be like this:
TPP-BestemmingscoderenServlet.txt
network: Connecting with proxy=DIRECT
[09 Nov 2011 06:10:57.994] New imageNo= 0 mailPieceId= null imageLen= 0
[09 Nov 2011 06:10:57.994] imageInfo=null
[09 Nov 2011 06:10:58.510] requestGET =
[09 Nov 2011 06:10:58.510] connecting to the servlet...
network: Connecting with proxy=DIRECT
[09 Nov 2011 06:10:58.760] New imageNo= 0 mailPieceId= null imageLen= 0
[09 Nov 2011 06:10:58.760] imageInfo=null
[09 Nov 2011 06:10:59.276] requestGET =
[09 Nov 2011 06:10:59.276] connecting to the servlet...
network: Connecting with proxy=DIRECT
[09 Nov 2011 06:10:59.511] New imageNo= 0 mailPieceId= null imageLen= 0
[09 Nov 2011 06:10:59.511] imageInfo=null
[09 Nov 2011 06:11:00.027] requestGET =
[09 Nov 2011 06:11:00.027] connecting to the servlet...
ProductcoderenServlet.txt
network: Connecting with proxy=DIRECT
[09 Nov 2011 07:39:56.403] New imageNo= 0 mailPieceId= TPP;UT2;PAR;PRO;2011;11;09;00;39;18;349;002;0000000232 imageLen= 0
[09 Nov 2011 07:39:56.403] imageInfo=null
[09 Nov 2011 07:39:56.918] requestGET =
[09 Nov 2011 07:39:56.918] connecting to the servlet...
network: Connecting with proxy=DIRECT
[09 Nov 2011 07:39:57.152] New imageNo= 0 mailPieceId= TPP;UT2;PAR;PRO;2011;11;09;00;39;18;349;002;0000000232 imageLen= 0
[09 Nov 2011 07:39:57.152] imageInfo=null
[09 Nov 2011 07:39:57.666] requestGET =
[09 Nov 2011 07:39:57.666] connecting to the servlet...
network: Connecting with proxy=DIRECT
[09 Nov 2011 07:39:57.900] New imageNo= 0 mailPieceId= TPP;UT2;PAR;PRO;2011;11;09;00;39;18;349;002;0000000232 imageLen= 0
[09 Nov 2011 07:39:57.900] imageInfo=null
[09 Nov 2011 07:39:58.415] requestGET =
[09 Nov 2011 07:39:58.415] connecting to the servlet...
network: Connecting with proxy=DIRECT
[09 Nov 2011 07:39:58.649] New imageNo= 0 mailPieceId= TPP;UT2;PAR;PRO;2011;11;09;00;39;18;349;002;0000000232 imageLen= 0
[09 Nov 2011 07:39:58.649] imageInfo=null
[09 Nov 2011 07:39:59.164] requestGET =
[09 Nov 2011 07:39:59.164] connecting to the servlet...
Is it possible? Thanks in advance.