How to extract bullet points with certain Key words in word

Hi,

I have a word documnets which is 50 to 100 pages(pages change). There are some bullet points marked with “[extract]”. What is the best wat of extracting such bullet points?

hi @Krithi1

You can consider below approach:

  1. use read text activity to read word doc
  2. then use regex on the extracted data to fetch what you need

How to write regex and extract is the question..:slight_smile:

How to separate each bullet point and extract only the bullets that has the keyword i am looking for? Also i need to pertain the format.

Can someone help with this please?

@Krithi1

Can you share a sample extracted input.

@Krithi1
Considering the below as input

Try this workflow


arrayLines = System.Text.RegularExpressions.Regex.Split(wordInput, "\r\n|\r|\n").Where(Function(x) Not String.IsNullOrWhiteSpace(x)).ToArray
if condition - currentText.ToLower.Contains("[extract]")
   finalString = finalString & Environment.NewLine & currentText.Replace("[Extract]", "").Replace("[EXTRACT]","").Replace("{Extract}","")

Hope this helps!

1 Like