writer =newFileWriter("output.txt")
newFile("Hello.txt").eachLine {
line ->if(line !='') {
writer.write((newString(line.getBytes("GBK")))+'r\n')
}
}
writer.close()
def age =25
print"Myageis:"
println age
println"Myageis:${age}"
print"Pleaseenteryourname:"
name =newInputStreamReader(System.in).readLine()
println"Mynameis:${name}"
 (tš©ng)Meaning | |||
 (tš©ng)Greedy |  (tš©ng)Reluctant |  (tš©ng)Possessive | |
 (tš©ng)X? |
 (tš©ng)X?? |
 (tš©ng)X?+ |
 (tš©ng)X , once or not at all |
 (tš©ng)X* |
 (tš©ng)X*? |
 (tš©ng)X*+ |
 (tš©ng)X , zero or more times |
 (tš©ng)X+ |
 (tš©ng)X+? |
 (tš©ng)X++ |
 (tš©ng)X , one or more times |
 (tš©ng)X{n} |
 (tš©ng)X{n}? |
 (tš©ng)X{n}+ |
 (tš©ng)X , exactly n times |
 (tš©ng)X{n,} |
 (tš©ng)X{n,}? |
 (tš©ng)X{n,}+ |
 (tš©ng)X , at least n times |
 (tš©ng)X{n,m} |
 (tš©ng)X{n,m}? |
 (tš©ng)X{n,m}+ |
 (tš©ng)X , at least n but not
more than m times |
([{\^-$|]})?*+.ãæ³šæïŒåšæäºæ¶åè¿äºç¹Dçå笊òq¶äžäžå®ä»£è¡šç¹Då«ä¹ïŒäŸåŠ - åš[a-c]äžæ¯å
åœWŠïŒäœåš a-c åäžè¡šç€ºçÒ(guš©)®å«ä¹ãäžqäžé¢æ²¡ååºçåœWŠåäžå®äžäŒ?xš¬)代衚ç¹Då«ä¹ã?br />
2ãå¯ä»¥å¯¹å
åœWŠè¿è¡è{ä¹ïŒäž»èŠæäž€¿Uæ¹æ³ïŒ(xš¬)
[abc] | a, b, or c (simple class) |
[^abc] | Any character except a, b, or c (negation) |
[a-zA-Z] | a through z, or A through Z, inclusive (range) |
[a-d[m-p]] | a through d, or m through p: [a-dm-p] (union) |
[a-z&&[def]] | d, e, or f (intersection) |
[a-z&&[^bc]] | a through z, except for b and c: [ad-z] (subtraction) |
[a-z&&[^m-p]] | a through z, and not m through p: [a-lq-z] (subtraction) |
. | Any character (may or may not match line terminators) |
\d |
A digit: [0-9] |
\D |
A non-digit: [^0-9] |
\s |
A whitespace character: [ \t\n\x0B\f\r] |
\S |
A non-whitespace character: [^\s] |
\w |
A word character: [a-zA-Z_0-9] |
\W | A non-word character: [^\w] |
Executalbe files åQ?tt>psdkdir\Bin
Include files åQ?tt>psdkdir\include
Library filesåQ?tt>psdkdir\lib
Include files åQ?tt>WpdPackPath\include
Library filesåQ?tt> WpdPackPath\lib