[Solved] Regex in dynamic profile rules

Hello, I’m making some dynamic profiles tailored to one lens, the Nikkor 1.8/50.

When I check the Lens field and fill in the full name, it works. But that name is rather long: Nikon AF Nikkor 50mm f/1.8, so I want to use a regex to find the lens.
If I write: re:Nikon 50 the dynamic profile is not applied, so this regex doesn’t find the lens.
On the other hand, re:Nikkor 50 works okay.

Both Art and RawTherapee behave the same here.

My question: what’s wrong with the regex re:Nikon 50?

Any ideas?

It simply does not match Nikon Nikkor 50

Thanks Ingo, so the regex doesn’t use a search construction as in Find Nikon+50…

.

You are doing string matching.
So you are asking dor the letters ‘nikon’ followed by a space , followed by ‘50’. And that’s not a match with the lens name .

Nikon.*50 would probably match what you want .
Somewhere in the name there must be the letters ‘Nikon’ followed by any kind of filler and then followed by ‘50’.

Ah, that works, thanks!

I would use Nikon.*50mm to avoid matching for example 50-250mm lenses

Good idea, that *50mm works as well, thanks!

Unfortunately, Nikon.*50mm will match a Nikkon Nikkor 50-250mm as well…you might try something like Nikon.*\s50mm. This ensures that there is a whitespace before the 50mm.

2 Likes