정규표현식 썸네일형 리스트형 [HIve] get access log from RegexSerDe in official Example:CREATE EXTERNAL TABLE intermediate_access_logs ( ip STRING, date STRING, method STRING, url STRING, http_version STRING, code1 STRING, code2 STRING, dash STRING, user_agent STRING)ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'WITH SERDEPROPERTIES ( 'input.regex' = '([^ ]*) - - \\[([^\\]]*)\\] "([^\ ]*) ([^\ ]*) ([^\ ]*)" (\\d*) (\\d*) "([^"]*)" "([^"]*)"'.. 더보기 [PHP] 특수문자 제거 정규표현식 Remove special characters in php $string = preg_replace("/[ #\&\+\-%@=\/\\\:;,\.'\"\^`~\_|\!\?\*$#()\[\]\{\}]/i", "", $string); 더보기 [정규표현식] 정규표현식 사용 예.. 1 #!/bin/sh 2 3 if [[ $# -lt 2 ]]; then 4 echo "Usage: $0 PATTERN STRINGS..." 5 exit 1 6 fi 7 regex=$1 8 shift 9 echo "regex: $regex" 10 echo $1 11 12 while [[ $1 ]] 13 do 14 if [[ $1 =~ $regex ]]; then 15 echo "$1 matches" 16 i=1 17 n=${#BASH_REMATCH[*]} 18 while [[ $i -lt $n ]] 19 do 20 echo " capture[$i]: ${BASH_REMATCH[$i]}" 21 let i++ 22 done 23 else 24 echo "$1 does not match" 25 fi 26 shi.. 더보기 이전 1 2 다음