Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要为 Java 应用程序创建正则表达式以查找每个xxxxxxxx.xxxx.xxxx.xx:XXXXX子域长度没有限制。在代码中:
xxxxxxxx.xxxx.xxxx.xx:XXXXX
msgEditOne = msgText.replaceAll("REGEXCODE", "replaced");
这个应该做的工作......
([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+:[0-9]+