16-06-23 07:51 AM
Hi All,
Can anyone help me with developing a code stage with C# or VB to convert text to collection
sample Input:
1.The capital of India.
Moscow
#Delhi
Kabul
Tokiyo
2.The capital of Japan.
Moscow
Delhi
Kabul
#Tokiyo
3.The capital of Afganistan.
Moscow
Delhi
#Kabul
Tokiyo
4.The capital of Russia.
#Moscow
Delhi
Kabul
Tokiyo
Output
16-06-23 10:41 AM
Hi,
The easiest way to achieve this without a code stage is by using the BP VBO's such as Strings & Collection Manipulation.
Steps:
17-06-23 06:27 AM
Hi
it is not code stage but another simple way
Here "Pattern" is regex pattern
(?<Question>\d+.*)[\r?\n]*(?<option1>.*)[\r?\n]*(?<option2>.*)[\r?\n]*(?<option3>.*)[\r?\n]*(?<option4>.*)
Initial string is your string
Output is just undefined collection
will get output collection
you can remove first column as below
Provide collection name and column name you want to delete
Regards