Question

How to Loop through a string variable??

  • 14 February 2023
  • 3 replies
  • 263 views

Badge +1

Hi, I’m a student who’s trying do assignment in Automation anywhere there’s some table data i have extracted from a pdf as a string variable.

100 Clear front covers $0.49 $49.00 
100 Black rear covers $0.99 $99.00 
100 Color copies (pages 1-2) $2.99 $299.00 
1000 Black and white copies $0.25 $250.00 

 

I want to manipulate this string and get data separately I'm thinking if I can loop this string and get one by one rows to manipulate and get Like 100, Clear front covers, $0.49, $49.00. Thank you :)


3 replies

Userlevel 3
Badge +12

Just to clarify, is each row above a string? Or is the whole block (all 4 rows) one string? That will affect the type and number of splits you need to do.

Userlevel 5
Badge +14

@Kavindu Perera :

 

you may be looking to extract or splint the data then use Extract text command 

 

Badge +1

Just to clarify, is each row above a string? Or is the whole block (all 4 rows) one string? That will affect the type and number of splits you need to do.

Whole four row is one string and i want separate into one by one. and some times it can be 3 or less rows too

 

Reply