ashok.p
(Ashok)
November 14, 2019, 10:27am
1
Hi,
I have a string (Invoice numbers) which I am getting from datarow. I need to split this string into individual items. The string looks like below format.
1573661473, 1064127539
1063135842, 1063135865
1063135926, 1064118204
1573657280, 1573657281
1064127539, 1573661473
1063136036, 1063136037
1573096301
1063137220, 1063137221
1573097055
I need the Data to be split with each Invoice number (for example ‘1573661473’). so that I can iterate through each Invoice number. can you please check.
3 Likes
Hi @ashok.p
I hope this might be helpful to you .Please see the link below for your reference.
Hi,
if you are a beginner in the world of automation and would like to know how you can manipulate text based on the solutions available in the VB.NET code and using REGEX (regular expressions) then you are in the right place.
In the topic below, you will learn how to easily extract data from any part of the search text using various methods.
The topic includes solution examples with descriptions and graphics to better understand the topic for functions such as:
Split
Substring
Left
Right
R…
cheers
Happy learning
4 Likes
sarathi125
(Parthasarathi)
November 14, 2019, 10:31am
3
@ashok.p
ashok.p:
1573661473, 1064127539
1063135842, 1063135865
1063135926, 1064118204
1573657280, 1573657281
1064127539, 1573661473
1063136036, 1063136037
1573096301
1063137220, 1063137221
1573097055
all these invoice numbers in a single string? or these are datarow values?
1 Like
Deepak94
(Deepak Kolge)
November 14, 2019, 10:33am
4
Simple.
StrArrayVar= trim(yourstring). replace (“,”," “). split (” "c)
It will split by space and will store all the values in StrArrayVar .
2 Likes
samir
(Samir Mohite)
November 14, 2019, 10:33am
5
@ashok.p ,
Use Splits method with comma (,) & Newline.
Assign
ArrStr (Array Of String) = a.Split({",",Environment.NewLine},StringSplitOptions.None)
4 Likes
ashok.p
(Ashok)
November 15, 2019, 1:58am
6
This comes in a single string.
1 Like
lakshman
(Ganta lakshman)
November 15, 2019, 2:02am
7
@ashok.p
You can split it based on comma then.
arrInvoices [] = yourStr.Split(","c)
1 Like
ashok.p
(Ashok)
November 15, 2019, 2:10am
8
@samir ,
This is giving the result in a sets of 2 to 3 Invoice numbers. please see the output format below.
1 Like
ashok.p
(Ashok)
November 15, 2019, 2:12am
9
@pattyricarte , thank you. checking on these.
2 Likes
samir
(Samir Mohite)
November 15, 2019, 5:15am
11
Okay, this will work for you @ashok.p ,
ArrStr = Text.Split({vbLf,","},StringSplitOptions.RemoveEmptyEntries)
1 Like
system
(system)
Closed
November 18, 2019, 7:37am
13
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.