The expression I have is
\((from \/projects(\/(\w|.)+)+):$(\d+\))
The strings I'm trying to match are:
(from /projects/idpro/branches/release_2018/test/test/test.1:13118)
(from /projects/idpro/trunk:13074)
the online regex testing utility I'm using blows up stating catastrophic backtracking
. So here I am trying to learn what backtracking is, so I can avoid it and fix my code.
Of the 2 string examples I have provided, I would like to match both. In the first case, I'm trying to match (from /projects
. After the word projects
, I want to ignore a path of any dept, so long as the string ends with a :\d+\)
Similarly, for the second example, I want a match if (from /projects
is followed by at least one folder
, and ends with a :\d+\)
.
AdThanksVance