桌面端重写请求修改

This commit is contained in:
wanghongenpin
2023-12-13 20:10:24 +08:00
parent f889fa1aa7
commit b018f98d87
8 changed files with 522 additions and 66 deletions

View File

@@ -1,7 +1,16 @@
import 'dart:io';
void main() {
print(RegExp('http://dddd/hello\$').hasMatch("http://dddd/hello/world"));
// print(RegExp('http://dddd/hello\$').hasMatch("http://dddd/hello/world"));
String text = "http://dddd/hello/world?name=dad&val=12a";
print("mame=\$1123".replaceAll(RegExp('\\\$\\d'), "123"));
print("app: ddd".split(": "));
print(text.replaceAllMapped(RegExp("name=(dad)"), (match) {
var replaceAll = "mame=\$1-123".replaceAll("\$1", match.group(1)!);
print(replaceAll);
return replaceAll;
}));
print(Platform.version);
print(Platform.localHostname);
print(Platform.operatingSystem);