Welcome to the Mythicsoft Q&A site for:

- Agent Ransack
- FileLocator Lite
- FileLocator Pro

Please feel free to ask any questions on these products or even answer other community member questions.

Useful Links:

- Contact Us
- Help Manuals
- Mythicsoft Home
0 votes

I want to find all .csproj files that are not targeting a specific version of the .NET Framework. Here is the regular expression I'm starting with:


This successfully identifies all files that are targeting .NET v4.5.1. For example, it will find the following string:


What changes would I need to make to my regular expression, if I want my search to match the following strings?

by (40 points)

1 Answer

+1 vote
Best answer

To match the 3 specific versions in one expression try:


However, in answer to the original question, ie "...not targeting a specific version...", if you wanted to list all the versions not targeting 4.5.1 you could use:


If you just wanted to list the framework version for all files you could use this:


Note: Strictly speaking I should've escaped the period in the version numbers since unescaped they'll actually match any character but this can make the regex hard to read and since the version numbers are only single digit it shouldn't be a problem.

by (31.3k points)
Perfect: (?!v4.5.1).*? is exactly what I was looking for.  Thank you so much!