Regex for Portfolio Inclusion Not Generating Hits

Using SonarQube Server Enterprise Edition v2025.2, trying to get projects to automatically be included in my portfolio based on Regex expression from the project key, nothing is returned.

Even using the example expression in the dialog box “A valid regular expression, eg. “.*Business” to match project names or keys that end with “Business”.” changing the word business to a word that I know ends a project key, does not generate any matches.

I’ve tried using expressions from regex101 that generate matches there, just not in the portfolio definition page.

Hey there.

Are you recomputing the portfolio after you change the definition?

FYI, your version is past EOL. You should update to either the latest version or the current LTA (long-term active version) at your earliest convenience. Your update path is:

2025.2-> 2025.4.2

You may find these resources helpful:

Hi Colin, thanks for getting back to me. Yes I’m aware that we are not up to date, but it’s a large company and updates are not easy to get scheduled. We are at least within the LTA version, so I would expect this to be working.

I have tried to recompute after everything I’ve tried and still nothing populates.

Feel free to share some more explicit examples (RegEx, project key, screenshots).

2025.2 is no longer an active version.

Here are some projects added to a portfolio manually:

And here’s the regex expression not generating any matches (but it does in regex101.com). This is after a recompute. I’ve also tried variations of this (in quotes, optimized for Java, etc) and it never picks anything up:

Also apologies, I did not see that 2025.1 was the LTA but 2025.2 was archived.

You just need to flip the last two characters in your regex:

com.nice.lib-cxia-utils*. should be com.nice.lib-cxia-utils.*

After making this change and recomputing, it should work as expected. At least it does in my tests!

With your original regex, com.nice.lib-cxia-utils*. would match strings like com.nice.lib-cxia-utilsssssss (* allows repeating the character before it, here s) and com.nice.lib-cxia-utilsssssssa (. alone matches any character, once).

Switching to com.nice.lib-cxia-utils.* ensures you match any string starting with com.nice.lib-cxia-utils followed by anything (any character, any number of times). For even more precision, you can use com[.]nice[.]lib-cxia-utils.* to match only the literal periods.

Hope this helps!