Replacing Regex

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<span style="font-family:Verdana,sans-serif; font-size:9pt Hi All,
<span style="font-family:Verdana,sans-serif; font-size:9pt I have a performance issue when I use regex in my code. I tried all the technics for making regex faster but none of them worked. So I need to use string functions to find a patter. The pattern
i am going after is

<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Consolas; color:blue; font-size:9.5pt private<span style="font-family:Consolas; font-size:9.5pt
<span style="color:blue const <span style="color:blue string pattern =
<span style="color:#a31515 @"^[A-Z]d+$";


<span style="font-family:Verdana,sans-serif; font-size:9pt Example for this is: if “D168” works but not “168” or “DD2D”


<span style="font-family:Verdana,sans-serif; font-size:9pt How can I come up with calculation to find the pattern without using regex? Such as using string functions.

<span style="font-family:Verdana,sans-serif; font-size:9pt Thank,
<span style="font-family:Verdana,sans-serif; font-size:9pt <span>

View the full article
 
Back
Top