Element split

Hi guys
How to split the element PC00206608-01

I need PC00206608 only as output

PC00206608 -01

Is 01 a fixed value?

I need a rule

@Vinutha_L Try this :


1 Like


hi @yundw,

No its not fixed, it can be any value but it is in this format.

Using regex (^[\s\S]{0,10})


hi @supermanPunch

the value can be changed its not constant. Actually am extracting the element from pdf using get text activity. the element is not constant. but its in this format

@Vinutha_L Yes. You can try with Other values and check. If you are storing the value in a variable ,it should work considering the separator is “-”

strValue = “PC00206608-01”



Is the standard string “-”?
Do you take the word before “-”?

hi @yundw


attached image for the reference.
Every time i need the policy number as output. As the pdf get change the policy number will also get change. i need only PC00206608.

policy number will be in same format. i need to extract only the number before the ‘-’

Best done with @supermanPunch’s answer

1 Like

Hi @supermanPunch,

it worked!

Thanks a lot!!! :slightly_smiling_face:

1 Like

Agreed with @supermanPunch . that is a best solution.

Attached is workflow using regex :slight_smile:
RegexToRemoveCharactersAfter-.xaml (4.7 KB)


Where FinalStr is System.Text.RegularExpressions.Regex.Replace(Str,"(.*)…$","$1", System.Text.RegularExpressions.RegexOptions.None)

Irrespective of whatever the string is, Here the last 3 characters of the string are removed.


Hey @mzahid

Thanks a ton!!! … :slightly_smiling_face: :slightly_smiling_face:


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