Skip to content

Commit

Permalink
SonarCloud complains if the capturing groups are removed (Group parts…
Browse files Browse the repository at this point in the history
… of the regex together).
  • Loading branch information
johnmay authored and egonw committed Mar 6, 2024
1 parent f4948cd commit 2af6236
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -672,7 +672,7 @@ else if (begNborIdx != endNborIdx) {

private static String generateAtom(IAtom atom) {
return "[" + Smarts.generateAtom(((QueryAtom) atom).getExpression())
.replaceAll("^\\[|]$", "") + ":" + getMapIdx(atom) + "]";
.replaceAll("(?:^\\[)|(?:]$)", "") + ":" + getMapIdx(atom) + "]";
}

private static void checkAtomMap(SmirksState state, IAtom atom) {
Expand Down

0 comments on commit 2af6236

Please sign in to comment.