PDA

View Full Version : Perform search in a particular area of a Text file.


pjaiswal
05-22-2006, 05:38 PM
Hello,

I have this text in a text file

GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7CF9A939-1F64-4E37-9A2B-9CA71C9CE5EF}.Debug|Win32.ActiveCfg = Debug Unicode|Win32
{7CF9A939-1F64-4E37-9A2B-9CA71C9CE5EF}.Debug|Win32.Build.0 = Debug Unicode|Win32
{7CF9A939-1F64-4E37-9A2B-9CA71C9CE5EF}.Release|Win32.ActiveCfg = Release Unicode|Win32
{7CF9A939-1F64-4E37-9A2B-9CA71C9CE5EF}.Release|Win32.Build.0 = Release Unicode|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection

My question is that how can I perform search in a particular area of this text file. For example if I need to search for a particular word say Release|Win32 only in the area between GlobalSection(SolutionConfigurationPlatforms) = preSolution and GlobalSection(ProjectConfigurationPlatforms) = postSolution how would I do that? How can I restrict my search only to a few lines and not the whole file?

Thanks.

kinook
05-23-2006, 07:47 AM
You would need to write some script code or a program to parse the file for the information you're looking for.