ASP.NET CORE中判断是否移动端打开网页
using Microsoft.AspNetCore.Http; using System; using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; namespace Niunan.BamaTZ.Web.Models { public static class RequestExtensions { //regex from http://detectmobilebrowsers.com/ private static readonly Regex b = new Regex(@"(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|i...

