Get text from table rows if some part of the sentence text/symbols are same

I have a data table(from UI scraping) in each row of specific column sentence consists of text then a number that consists of / and then again text. e.g. Hello 55/55 by rbt. How best get only this part of the text “ 55/55” from all rows? In sentence all text and numbers in each row are diferent but this part “<rbt-” and this “/” are same. After that i have to compare text and get from it just numbers.

If you split the text on a space then you can look for the string in the array that contains a “/” - you can then add this item to another array to capture all the “55/55” parts of the string.

StringVaraible.Split({“ ”},StringSplitOptions.None) - this will give you an array of strings.

If your number value is always the second part of the string then you can use StringArray(1) - this will give you “55/55”.

Otherwise you can use a for each loop on the array of strings and an If statement to check if item of the array contains a “/” ?

Hopefully i understood you correctly?

1 Like

is there always a space before and after “##/##”?
Is the “##/##” always 2 digits/2 digits?

Sorry, e.g. Hello 55/55 by rbt.
And before “<rtb-“ can be 1 or more words, after “>” there always space and in this ##/## digits can be 1 or more for e.g. Hello my name Tom 6/7875 and my mother name is Linda

Sorry, e.g. Hello 55/55 by rbt.
And before “<rtb-“ can be 1 or more words, after “>” there always space and always space before ##/## and after and in this ##/## digits can be 1 or more digits for e.g. Hello my name Tom 6/7875 and my mother name is Linda

Then TimK reply is what I would suggest.

Another option would be to use regex on the string

(\d+\/\d+)

that would return the item in the string which matches your pattern. of digits / digit etc…

1 Like