Hello,
can any one help me how to get text between heading1 and heading2. in text file or pdf file…
Thanks,
Suresh.
Hello,
can any one help me how to get text between heading1 and heading2. in text file or pdf file…
Thanks,
Suresh.
Fine if this string is placed in a text file
—use READ TEXT FILE activity and get the output with a variable of type string named str_input
—now use a ASSIGN activity like this
Str_output = System.Text.RegularExpressions.Regex.Match(str_input,”(?<=Heading1).*(?=Heading2)”).ToString
Cheers @suresh_kumar4
Try this regex to get the text between two text.
regexPattern = (?<=Heading 1)(.*\n)+(?=Heading 2)
Hi,
i am getting like this…
str.Split({“Heading 1”+Environment.NewLine, Environment.NewLine+“Heading2”},StringSplitOptions.None)(0)
sorry getting error while opening the file…
fine
this was the expression used
test.ToString.Substring(test.IndexOf(“Heading1”)+“Heading1”.Length,test.IndexOf(“Heading2”)-“Heading2”.length).ToString
Cheers @suresh_kumar4
Thanks a lot @Palaniyappan !!! …
But here my 2nd heading also coming while extracting… so can you help me on this final issue…
like this i am getting…
i need only this part…
Thanks,
Suresh.
can you send me the code…
sorry for the inconvinience , pls send me the code alone i am not able to open this file…
still i am getting that extra text, any how thanks a lot…