MCPcopy Create free account
hub / github.com/Chave0v0/API-Highlighter / convertPathToRegex

Method convertPathToRegex

src/main/java/com/chave/utils/Util.java:23–26  ·  view source on GitHub ↗
(String path)

Source from the content-addressed store, hash-verified

21
22public class Util {
23 public static String convertPathToRegex(String path) {
24 // 使用正则表达式替换 {.*} 为 [^/]+
25 return path.replaceAll("\\{[^/]+\\}", "[^/]+");
26 }
27
28 public static boolean checkAPIItemExist(APIItem o) {
29 boolean isExist = false;

Callers 3

exactMatchMethod · 0.95
semiFuzzMatchMethod · 0.95
fuzzMatchMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected