Unlike Windows 8/8.1 there is only one Microsoft Edge browser, rather than an “immersive” touch friendly browser and regular desktop win32 app. As such you can’t detect the difference with the UA string, as there is no difference.
However, if your use-case is to give touch friendly layout for touch devices (tablets and convertibles, 2-in-1s, etc) and a more compact layout for mouse and keyboard only users, you can use feature detection in CSS for this.
For this you can use CSS Media Queries Interaction media features.
If you want to detect that there is a touch screen:
@media (pointer: coarse) {
...styles for touch screen...
}
If you want to detect that the user can’t hover (a common issue on touch screens):
@media (hover: none) {
... styles ...
}
It is however important to point out that this reports the primary pointing device. In machines such as convertibles where there can be a trackpad/mouse and touch screen, it may report the values for a touch screen.
See the spec for details.