Search code examples
regexuipathuipath-studio

Match data between points and ignore some words


Hello is it possible to match data between points like 6.1.1 - 6.1.2.

Here is real world example : https://regex101.com/r/n1XHaG/1.

I have points like this 6.1.1 and 6.1.2(30-40 points , but same way structured) and they are always on left side and text which I need is always on right. It's not a problem each point to be different match just to adjust the start and end word. This is actually what I'm trying to achieve , but I'm getting text from the title point as well and empty spaces and then I need to edit it after that which is not that great solution. I'm using it for automation in UiPath to take data from pdf and insert it in word.

I'm not sure if it's possible to take the string only on right side or while taking the string to ignore some words from the title since they are in the same line as the data which I need.

This is what I need to achieve : https://ibb.co/sFPrSRf

Best regards


Solution

  • ^(.){0,45}(.*)$
    

    Now concat 45 dots and group 2 followed by \n

    .............................................$2\n # or even without \n based on your modifiers

    Result: enter image description here