What sort of trouble are you having? Please provide what you’re attempting as well as any errors. (formatted as code, please. Use the </> icon) This will allow us to help you. I look forward to your update!
The “problem” is just extracting it, the rest I already completed,
uh my bad I wasn’t explaining what I was doing,
I basically have a script to install some firefox extenstions without user interactions, since firefox blocked side loading a while ago the only option is doing it using a script.
Installing uBlock extenstion is already done, I just need a way that will extract the UUID, using that to open the settings page and then restore a backup file (most of the work is done), the only part I would like to improve with this script is that instead of manually clicking the ublock extenstion icon and getting into settings page this way - I would love to have the UUID and using that to automatically open the settings page.
I’m basically finished I just need a better regex, I’m not the best at regex, if someone can help me with this it would be wonderful and I will finally get on with my life.
Please don’t get me wrong - but have you tried to search for it? In the vast majority of the cases you’re not the very first one with a given task. So it is pretty likely that someone already mastered the same or a similar challenge and shared it with the world.
When I search for "powershell regex uuid" - powershell regex uuid - Google Search there are more than enough hits with promising examples of code snippets …
I did try to search, of course, and those links are for GUID in a simple text, I have multiple GUID in this text and need to extract only one, which can only be done using regex, and I’m not good with regex, that’s the problem.
My prefs.js doesn’t have that in it even though I have the extension so I had to make up a file to test. I can see the problem you have is that you need to select that specific GUID so you just need to make sure it’s preceded by the uBlock stuff. Try this pattern:
Finally, thank you!!!
Just one more question - how do I make it as $uBlockUUID variable?
Edit, nvm you just add $blabla in front of the (select-string) row.