How to get specific indx value from ienumerable variable?

Hello,

i have created automation which fetches data from jira tickets but sometimes user puts sentences instead of mail id like below -
Please provide Jira license and BigPicture access to the following users: , kunalmathkar@abccompany.com swapnil@abccompany.com akshay@abccompany.com Access Type: Jira Access - e-collab Team Member BigPicture - Box Editor; requesting iHelpdesk intervention

here i only need to fetch my mail id so i am using regex and possibility that there will be one or more than 1 emails in this sentence.

so i am using below regex to identify one or more emails -

then checking with condition if no email then no action needed-

else if email is there then getting one by one email-

Here emailmatches is Enumerable variable
now my requirement is to get email which is at position 0 -kunalmathkar@abccompany.com
now my requirement is to get email which is at position 2- akshay@abccompany.com

how can i achieve that?
if i put currentitem(0) thenn it gives option strict on disallowed strict binding error.

please help me on same

@Mathkar_kunal

currentitem is the loop on your ienum variable

instead you need to do emailmatches(0)

cheere

ok thanks ,
worked , is is possible to get count of how many emails are there in ienumerable variable emailmatcehs?

@Mathkar_kunal

emailmatches.count

cheers

showing count is not member of ienumerable

@Mathkar_kunal

try adding toarray before count

also please specific the variable type used if you have further clarification

cheers

for toarray as well same error - ‘toarray’ is not part of ‘IEnumebrable’

system.collection.IEnumerable is the variable type

@Mathkar_kunal

try this emailmatches.Cast(Of Object).Count

cheers

thanks worked , able to get count