How to split the Apartment details from address

Hi,

i need to split the Apartment details from address
Example: 814 Chapman Dr. Apt 10
output: Apt 10

we can use e.g. regex:

HI @harika_k

Is any keyword static in that?

Regards

Hi @harika_k

address = "814 Chapman Dr. Apt 10"
Message box
"Apt " + address.Split({"Apt"}, StringSplitOptions.None)(1).Trim()

image

grafik

And can bring some dynamics in it:
grafik

Thank you Pravallika the solution works

1 Like

@harika_k
Welcome
Happy Automation

@harika_k
keep in mind aspects of defensive handling

grafik

Hi pravalika,

if i want before apt text what is the logic for this?

@harika_k
Create a new topic so that it will help for others to search

@harika_k

address.Substring(0, address.IndexOf("Apt"))

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