If: Index and length must refer to a location within the string.
Parameter name: length
below is the value which is fetching from web page
Any suggestions or any comments earlier logic was working fine.
Thanks…
If: Index and length must refer to a location within the string.
Parameter name: length
Any suggestions or any comments earlier logic was working fine.
Thanks…
Can you please mention your requirement in the below format? So that it will be easy understand.
Your Input:
Expected Output:
Thank you.
Hi,
Based on screenshot we don’t need substring function i guess. we can use simple replace function to get the address. please try below steps.
if → item.tostring.contains(“Address1”)
then → IvAddress = item.tostring.replace(“Address1”,“”)
IvAddress = IvAddress.trim
After trying above method , values comes twice as it repeating twice on web page which i have attached earlier
Hi,
In that case we have to add split condition.
if → item.tostring.contains(“Address1”)
then →
IvAddress = item.tostring.split(“Address1”)(0)
IvAddress = IvAddress.replace(“Address1”,“”)
IvAddress = IvAddress.trim
More over your logic without substring that’s all. Thanks.
You can follow what @kirankumar.mahanthi1 mentioned.
Using RegEx will be an alternative way.
Trim the regex output on both the ends to the expected result.
Thank you.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.