Remove part of string from Row

i am using data scraping to get data from table in website. So i am getting string “for entity number 03422228 PREFERRED CONTRACTING INCORPORATED” but i want only
So i want to know how to remove this part of string for each row. so for each row this string will always be present “for entity number” but this number “03422228” will be changed for each row. So i want to know how to fix this.

in a for each row you can modify the value
regex Match / Matches activity will help
for a simple regex pattern triggered by a fixed length digit the result looks like this:

@ppr the solution looks good but can you please help me how to use regex ? or if possible share the sample .xaml ?

use the Matchers activity and configure as following:

for the replacement use an assign activity:
left side: row(yourColNameOrIndex)
rightside: Matches(0).toString

Thank you @ppr it’s working. Really appreciated.

1 Like

@ppr also can i check if string equals the most for example “CONCRETE NORTH, INC.”. so if string in for each row is equal to “CONCRETE NORTH, INC” or “CONCRETE NORTH INC”
if (difference between string is space or . or ,) then return as true.

because in this case my result is not correct. is there any function like if equal percentage is equal to 90% then return as true.
now my string is “CONCRETE NORTH, INC” but data from each row is “CONCRETE NORTH INC” and “CONCRETE NORTH INC.” so how to deal with this ? as the if condition is always false for this

it is very important to work with clear requirement definitions.
your first given request was about retrieving text after a 8 long digit.
we did with regex and here you can do some addtional plays:

it seems that it is working. So ideally close this topic with marking the solving post as solution. So other members searching a solution will benefit from this.

About your question do a research on forum or open a new topic. Also the requirements are to share in a more precise format.

I did understand:

  • After retreiving the text behind the 8 digit (the contrractor?) you would like to check which contractor it is
  • as the contractors are coming in variations, so a strict contains /equals would fail on the vatriations

is my understanding correct?

@ppr yes you are correct. Also i will mark the answer as the solution so that other members can benefit from this.

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