js
var pattern = //;
var str = "";
console.log(pattern.test(str));
var str = "";
console.log(pattern.test(str));
java
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RegexMatches {
import java.util.regex.Pattern;
public class RegexMatches {
public static void main(String args []) {
String str = "";
String pattern = "";
Pattern r = Pattern.compile(pattern);
Matcher m = r.matcher(str);
System.out.println(m.matches());
String pattern = "";
Pattern r = Pattern.compile(pattern);
Matcher m = r.matcher(str);
System.out.println(m.matches());
}
}
python
import re
pattern = re.compile(ur'')
str = u''
print(pattern.search(str))
pattern = re.compile(ur'')
str = u''
print(pattern.search(str))
php
$str = "";
$isMatched = preg_match('//', $str, $matches);
var_dump($isMatched, $matches);
$isMatched = preg_match('//', $str, $matches);
var_dump($isMatched, $matches);
go
package main
import (
func main() {
import (
"fmt"
"regexp"
)"regexp"
func main() {
str := ""
matched, err := regexp.MatchString("", str)
fmt.Println(matched, err)
}
matched, err := regexp.MatchString("", str)
fmt.Println(matched, err)
ruby
pattern = //
str = ''
p pattern.match(str)
str = ''
p pattern.match(str)
- 热门电子书
- 电子书下载
- JSON格式化
- 在线加密/解密
- 进制转换
- 前端工具
- 格式化/压缩
- 其他工具