almenscorner / IntuneCD

Tool to backup, update and document configurations in Intune
MIT License
290 stars 38 forks source link

Match Prefixes not being delimited by a space character #139

Closed jangrundmann closed 1 year ago

jangrundmann commented 1 year ago

I see the code is checking for a space character following defined prefix in the object's name. I'd say it's more versatile if it wouldn't do that. Do you have any specific reason why is it like that? If it wouldn't check I could still explicitly tell I need to search for prefix being delimited by a space by specifying it.

Current behavior: --prefix Win "Win_policy1" - won't match "Win policy1" - will match

Suggested behavior: --prefix Win "Win_policy1" - will match "Win policy1" - will match

--prefix "Win " "Win_policy1" - won't match "Win policy1" - will match

almenscorner commented 1 year ago

No specific reason really :) I will push a change to beta soon where it uses regex instead so it will work as you describe it above, also it will be case insensitive

almenscorner commented 1 year ago

try it out in the beta: pip install IntuneCD==2.0.4b1