powershell - Why is -like not working but -match does? -


I am planning an amber web app, which I want to work on a page without reloading the page.

However, I want to be able to share the app's status at any time, and therefore want to use amber's URL-centric design.

As a total Amber Nob, I am wondering how and how Amber completes it (trusts the routes, but without reloading the page).

Any information is highly appreciated!

I recommend reading on "query parameter" (see) because it is a feature that you Looks like.

I have received this script from here and this is to uninstall an application , But when -mail instead of as in the first 2 rows, whenever I use the full app name

The name of the app is included in the version, so I want to name the wildcard in the script to support "MyApp 2.4.1". Thanks!

$ uninstall32 = gci "HKLM: \ SOFTWARE \ WOW6432Node \ Microsoft \ Windows \ CurrentVersion \ Uninstall" | Agree {GP $ _ PSPath} | ? {$ _-Like "MyApp *"} | UninstallString $ uninstall64 = gci "HKLM: Software \ Microsoft \ Windows Select CurrentVersion \ Uninstall" | Agree {GP $ _ PSPath} | ? {$ _-Like "MyApp *"} | Select UninstallString ($ uninstall64) {$ uninstall64 = $ uninstall64.UninstallString- Change "msiexec.exe", "" -replace "/ I", "" -Replace "/ X", "" $ uninstall64 = $ uninstall64 Write trim () "Uninstalling ..." start-process "msiexec.exe" -arg "/ X $ uninstall64 / qb" -what} if ($ uninstall32) {$ uninstall32 = $ uninstall32.UninstallString- Change "msiexec.exe The initial process "msiexec.exe" -arg "/ $ $ uninstall32 /", "" reset "/" "," Replace "/" Replace "/" $ "," uninstall32 = $ uninstall32.Trim " Qb "-Wait}

Consider the following string" MyApp 2.3.4 "when you are between two examples >

  • Match ? {$ _ - Mail "MyApp *"}
  • -write is looking for a string onset with "MyApp" anything After the latter is searching for "MyApp" text after any character after the -Match before that there is a preceding place, so the -shadow will fail. > - Match considers "MyApp *" as a rezx string that looks for "MyApp" by any character In this case it does not care about space about it. I suspect that if you change it, then -mail will fail? As {$ _-mail "^ MyApp *"} the caret says the beginning of the string.

    If you want to work with -like in this case, then you should change it to ? {$ _-Like "* MyApp *"}

    Important

    I'm right why you could not compare because it The problem is happening with you at first place


    Comments

    Popular posts from this blog

    graphviz - size of node with shape=circle -

    android - TCP sending with Unity -

    properties - C#: How to set default value for a property in a partial class? -