Commit 6b198c32 authored by 王万里's avatar 王万里

test: 测试配置文件正则

parent 887629bb
......@@ -16,5 +16,14 @@
<div class="box">
bocx
</div>
<script>
var reg = /^(\/[^\/]*)(\/.*)?idm\/?$/
var str = 'welcome-to-nan-idm-jing-uni idm-ioi'
var str1 = str.replace(reg, '$1')
console.log(str1)
var reg2 = /\/$/
var str2 = str1.replace(reg2, '')
console.log(str2)
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment