remove blocks from a text

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ciem
    New Member
    • Apr 2010
    • 1

    remove blocks from a text

    Hi everbody,
    i want to remove text blocks which start with 'Description=st ring' and finish with 'CampaignServer/RightPointCampa ignServer/MdapEngine/Services/CC-Corporate-Service]' and include 'explorer'. i want to remove this blocks from my text.

    Thanks you...

    my text:

    Description=str ing:
    SignificanceThr eshold=dword:14
    ServiceRelative Directory=strin g:GoldenMiner
    StartSyncTime=d word:7FFFFFFF
    TraceLevel=dwor d:0
    [CampaignServer/RightPointCampa ignServer/MdapEngine/Services/CC-Corporate-Service]
    Description=str ing:
    SignificanceThr eshold=dword:14
    ServiceRelative Directory=strin g:explorer
    StartSyncTime=d word:7FFFFFFF
    TraceLevel=dwor d:0
    [CampaignServer/RightPointCampa ignServer/MdapEngine/Services/CC-Corporate-Service]

    Description=str ing:
    SignificanceThr eshold=dword:14
    ServiceRelative Directory=strin g:Example
    StartSyncTime=d word:7FFFFFFF
    TraceLevel=dwor d:0
    [CampaignServer/RightPointCampa ignServer/MdapEngine/Services/CC-Corporate-Service]
    Description=str ing:
    SignificanceThr eshold=dword:14
    ServiceRelative Directory=strin g:explorer
    StartSyncTime=d word:7FFFFFFF
    TraceLevel=dwor d:0
    [CampaignServer/RightPointCampa ignServer/MdapEngine/Services/CC-Corporate-Service]

    Description=str ing:
    SignificanceThr eshold=dword:14
    ServiceRelative Directory=strin g:question
    StartSyncTime=d word:7FFFFFFF
    TraceLevel=dwor d:0
    [CampaignServer/RightPointCampa ignServer/MdapEngine/Services/CC-Corporate-Service]
  • woooee
    New Member
    • Mar 2008
    • 43

    #2
    Read the file one record at a time as you would normally do. When you reach a "Description=st ring:" record, append each record to a list until the next "Description=st ring:" record is found. if you want to retain the records in the list, copy them to a file or whatever, then empty the list, rinse and repeat.

    Comment

    Working...