Welcome to openkapow Sign in | Join
in Search
.

how to extract this sample text

Last post 07-10-2008, 5:26 AM by kishorem. 6 replies.
Sort Posts: Previous Next
  •  07-07-2008, 2:11 AM 20334

    how to extract this sample text

    hi all  i need little help in extracting text from the sample code below

     <td > 
    <font size="-0"><a id="an1" href="url.com">Url1</a></font><br>
    sample text1 sample text1
    <br>
    sample text1 sample text1 <br>
    <span class="a">www.test.com</span>
    <br>
     <br>
    <font size="-0"><a id="an2" href="http://url2.com">Url2 </a></font>
    <br>
    sample text1<b>[bold]</b> sample text1<br>
    sample <b>[bold]</b>text1 sample text1<br>
    <span class="a">www.doof.com</span>
    <br>
    <br></td>

    Now problem here is in extraction of that bold text is arbitrary. its position is not fixed  it can come in any place.

    i want to extract first "sample text1" line of text as first description and second "sample text2" as second description irrespective of bold text wheter it comes in line or not.If its come include it in respective description .

    thanks

    kishore 

    Filed under: ,
  •  07-07-2008, 10:32 AM 20342 in reply to 20334

    Re: how to extract this sample text

    I don't understand your question.

     Where's sample text 2 ? Why not just submitting the real url ?

    (feel free to send a private message with url if you don't want it discussed in public )

     

     

     

  •  07-09-2008, 12:08 AM 20356 in reply to 20342

    Re: how to extract this sample text

    Sorry my fault,

    Correct code is below 

    <td > 
    <font size="-0"><a id="an1" href="url.com">Url1</a></font><br>
    sample text1 sample text1
    <br>
    sample text1 sample text1 <br>
    <span class="a">www.test.com</span>
    <br>
     <br>
    <font size="-0"><a id="an2" href="http://url2.com">Url2 </a></font>
    <br>
    sample text2<b>[bold]</b> sample text2<br>
    sample <b>[bold]</b>text2 sample text2<br>
    <span class="a">www.doof.com</span>
    <br>
    <br></td>

  •  07-09-2008, 1:46 PM 20372 in reply to 20356

    Re: how to extract this sample text

    Hi kishorem

    Are you having problems with extracting all of the sample text as one description?

    -Simon

  •  07-10-2008, 12:24 AM 20381 in reply to 20372

    Re: how to extract this sample text

    extraction is not a problem , Problem occur when theere is 'b' tag in sampletext1 and sample text2 ,the position of 'b' tag is not fixed ,Now bold text can come in any place , it can be in first ,last .middle,or any position between  'br' tag, or 'b' not come in this sample text1

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    example 1

    <br /> 

    sample text1 <b> some bold text</b> sample text1

    <br/>

    example 2: 

    <br/> 

    <b> some bold text</b> sample text1  sample text1

    <br/> 

    example 3:

    <br/> 

     sample<b> some bold text</b> text1  sample text1

    <br/>

    example 4:

    <br/> 

     sample text1  sample text1<b> some bold text</b>

    <br/>

     ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    i want to extract complete line as description1 between br tag irrespective of b tag

     

    Thanks all

    kishore 

     

     

  •  07-10-2008, 4:13 AM 20383 in reply to 20381

    Re: how to extract this sample text

    Ok kishore

     I think I understand. You'll have to use Extract Clip which can extract everything between two given tags.

    1. Add a new step and whose Extract Clip as action for the step.

    2. now select two tags: one at the beginning of the part you want to extract and one at the end of the part you want to extract. Select these as tag 1 and tag 2.

    3. click the tab Clip Combining in the Extract Clip step.

    4. choose "grid layout"

    5. Choose 1 row and 1 column.

    6. In the only cell choose "from tag 1 to tag 2"

    There. Now the robot should extract everything between those two tags. I have an example if you want to look at it:  http://openkapow.com/files/folders/tutorials_and_examples/entry20382.aspx

    Hope that helped

    -Simon

  •  07-10-2008, 5:26 AM 20384 in reply to 20383

    Re: how to extract this sample text

    Thanks Simon for your tutorial

    i currently checking it and back to you seen

    thanks man 

     

View as RSS news feed in XML
.
Copyright 2006, 2007 KapowTech.com All Rights Reserved Company | Contact | Terms | Privacy