You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
474 B
23 lines
474 B
package com.pqh.qqbot
|
|
|
|
import org.junit.jupiter.api.Test
|
|
|
|
class AppTest {
|
|
|
|
@Test
|
|
fun testRegex(){
|
|
val s="http://gchat.qpic.cn/gchatpic_new/1029559041/981632964-2949860370-58391EFD3CADE5292A9C9EF98AAFA0A4/0?term=2"
|
|
val result= Regex("\\d+-\\d+-[0-9A-Z]+").find(s)
|
|
println(result?.value)
|
|
}
|
|
|
|
|
|
@Test
|
|
fun testFor(){
|
|
for((index,value) in listOf("a","b").withIndex()){
|
|
println("${index}=${value}")
|
|
}
|
|
}
|
|
|
|
|
|
} |