How to find multiple occurencess of a particular word in a collection

Hii, I have string like in below format

                      Front  size
                        17
                         543/19

                   Rear size
                     18
                    6543/98

                 size
                  19
                  765/09

So, I wanted to extract 17,18.19 in a collection.
The number which I wanted to extract is after “size” keyword.
It looks like there is a line break but it is not.It is coming under one whole string.
Please help ASAP

Hi @Dummy

Follow the below Regex expression to achieve the ouput:

(?<=size)(\n.*)[\d]+


Note: Refer the below workflow for reference

Sequence3.xaml (7.4 KB)

Hope it helps!!
Regards,

Hi,

Can you try the following pattern?

(?<=size\s+)\d+

image

Edit : added example

arrString = System.Text.RegularExpressions.Regex.Matches(yourString,"(?<=size\s+)\d+").Cast(Of System.Text.RegularExpressions.Match).Select(Function(m) m.Value).ToArray()

Regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.