473,395 Members | 1,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

remove blocks from a text

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

Thanks you...

my text:

Description=string:
SignificanceThreshold=dword:14
ServiceRelativeDirectory=string:GoldenMiner
StartSyncTime=dword:7FFFFFFF
TraceLevel=dword:0
[CampaignServer/RightPointCampaignServer/MdapEngine/Services/CC-Corporate-Service]
Description=string:
SignificanceThreshold=dword:14
ServiceRelativeDirectory=string:explorer
StartSyncTime=dword:7FFFFFFF
TraceLevel=dword:0
[CampaignServer/RightPointCampaignServer/MdapEngine/Services/CC-Corporate-Service]

Description=string:
SignificanceThreshold=dword:14
ServiceRelativeDirectory=string:Example
StartSyncTime=dword:7FFFFFFF
TraceLevel=dword:0
[CampaignServer/RightPointCampaignServer/MdapEngine/Services/CC-Corporate-Service]
Description=string:
SignificanceThreshold=dword:14
ServiceRelativeDirectory=string:explorer
StartSyncTime=dword:7FFFFFFF
TraceLevel=dword:0
[CampaignServer/RightPointCampaignServer/MdapEngine/Services/CC-Corporate-Service]

Description=string:
SignificanceThreshold=dword:14
ServiceRelativeDirectory=string:question
StartSyncTime=dword:7FFFFFFF
TraceLevel=dword:0
[CampaignServer/RightPointCampaignServer/MdapEngine/Services/CC-Corporate-Service]
Apr 22 '10 #1
1 1776
woooee
43
Read the file one record at a time as you would normally do. When you reach a "Description=string:" record, append each record to a list until the next "Description=string:" 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.
Apr 22 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Jan | last post by:
Hi there, Is there a way to remove spaces from a line of text? For example: vr 12-12-79 city village state name I want it to be:
14
by: J.S. | last post by:
In a Windows Form application, which is the better method to concatenate large blocks of code? 1. Reading the text from text files. 2. Adding the text to the VB file itself? Thanks! J.S. ...
7
by: Nick Keighley | last post by:
Hi, I took a quick look for a FAQ (apparently this ng doesn't have "a" FAQ). And the resources I've checked are contradictory. I want two blocks of text to appear next to on another. HTML...
26
by: brenocon | last post by:
Hi all -- Compared to the Python I know and love, Ruby isn't quite the same. However, it has at least one terrific feature: "blocks". Whereas in Python a "block" is just several lines of...
2
by: flyzone | last post by:
Goodmorning people :) I have just started to learn this language and i have a logical problem. I need to write a program to parse various file of text. Here two sample: --------------- trial...
12
by: Michael7 | last post by:
Hi Everyone, I've been trying to get two blocks of text to be aligned, one left, one right, on the same line. What I'm trying to mimic is what I did with tables here: ...
0
by: marss | last post by:
I want to place 3 blocks (divs) in a row, both the left and right blocks have a fixed width, the center block fills a gap between them. I posted below simplified example. It shows exactly what I...
26
by: Brad | last post by:
I'm writing a function to remove certain characters from strings. For example, I often get strings with commas... they look like this: "12,384" I'd like to take that string, remove the comma...
61
by: arnuld | last post by:
I have created a program which creates and renames files. I have described everything in comments. All I have is the cod-duplication. function like fopen, sprint and fwrite are being called again...
3
by: Andy B | last post by:
I need to search an xml element for blocks of text. The start of the text block will have a 5 digit number in it and i then need to read until the next 5 digit number. After this, I need to put...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.