Hi Guys,
Am trying to split the string as like below, but am getting following error for the same:
System.Text.RegularExpressions.Regex.Match(FileName,“(?<=EBB IND98**STANDARD )([\S\s]*)(?=PREFERRED PRIMARY)”).Value.Trim
Assign: parsing “(?<=EBB IND98**STANDARD )([\S\s]*)(?=PREFERRED PRIMARY)” - Nested quantifier *.
Please let me know how to fix the same.
Thanks,
Gokul.
1 Like
You can’t have two asterisks **
in the expression. An asterisk means match one or more of the previous character. To match literal asterisks you need to escape them as \*
.
1 Like
Hi @gokulvasant
System.Text.RegularExpressions.Regex.Match(FileName,"(?<=EBBIND98*STANDARD)([\S\s]*)(?=PREFERRED PRIMARY)").Value.Trim
Please try the above regex , if still facing the issue , please paste the input string so that we could help with the pattern.
Thanks.
system
(system)
Closed
May 10, 2022, 1:39pm
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.