Need Help For If-Function when regex expression does not return anything!

Hi attached above is the workflow i have use for my project. Inside the matches i have used (?<=**\s+)(.). I then saved it as Title and it falled under the variable type:IEnumerable . In a scenario where my regex expression failed to work and did not capture anything , i would like to return it as “xxx”. i have used title.count=o but it failed to work. i tried assigned TitleNamee2= Title(1).ToString which is to convert my output (Title ) into a string. then i wrote a if statement in hope that if it failed to capture anything it will return “xxx” but it failed to work as well. Does anybody knows how to go about it? any advice will be greatly appreciated. Will it be wiser for me to try to convert IEnumerable to a string type first?or just do if function with IEnumerable?

have a look here

Hi Mr Peter i am still having some doubts with the explanations and requires more clarification.
Regarding the if condition for yourMatchvar.Any()
am i supposed to copy this entire thing into my if function? or just Title.Any() ?what exactly does yourMatch.Var refers to?

i not reallt sure how this work as it is my first time exploring this functions

Can you please share some
sample text,
the pattern is: (?<=** \s+)(. ) right?
and you are interested on the Matched Value
Can we assume that only 0 or 1 Match is to expect or 0,1, or many Matches?

@kelly07.19 - Try Title(0).success…if you have value this returns “true”

yup the pattern is (?<=**\s+)(.).
hi sorry as this is a school project i am not able to share the explicit sample text.
But i can share with you in detail what i am doing so i have around 30 samples which included a mix of image pdf and text pdf. for text pdf the regex expression work well as it imaged to extract the * symbol however for image pdf it failed to extract the * symbol therfore i was finding a solution to turn the title for image into xxx. does that help to answer if 0 or 1 match to to expect or 0,1, or many Matches? your help will be greately appreciated as i have spend many day doing with no outcome

Hi i have tried that and it say options strict on disallows implicit conversations from “Boolean” to “String”

You have to assign it to boolean variable not string. Error tells you clearly.

By boolean you mean this? i have tried and it did not managed to capture “xx” . so sorry sir for troubling you. i am really not familiar with uipath terms , is there free resources i can deepen my knowledge on ,as my own research seems to not been having much progress. Based on my understand Boolean is for if function am i right? and if i use title.count=o is is also applicable for when the function is empty

i have already try Title(0).success it did not capture xxx as well. the reasons why i try Title(1).success is because my desired results from regex expression is one line later