??xml version="1.0" encoding="utf-8" standalone="yes"?>
slist.add("str2");
slist.add("str3");
slist.add("str4");
slist.add("str5");
for(String tempStr:slist) {
System.out.println(tempStr);
}
]]>
var myReg = /^\d+$/;
return myReg.test(strnum);
}
]]>
var regu = "^(([0-9a-zA-Z]+)|([0-9a-zA-Z]+[_.0-9a-zA-Z-]*[0-9a-zA-Z]+))@([a-zA-Z0-9-]+[.])+([a-zA-Z]{2}|net|NET|com|COM|gov|GOV|mil|MIL|org|ORG|edu|EDU|int|INT)$"
var re = new RegExp(regu);
if (email.search(re) != -1)
{
return true;
}
else
{
return false;
}
}
/*function validateEmail(email){
if(email == null || email == "") return false;
var myReg = /^[_a-z0-9.-]+@([_-a-z0-9]+\.)+[a-z0-9]{2,3}$/;
return myReg.test(email);
}
function checkemail(email){
if (email == null || email.length == 0) return false;
var pattern = /[a-za-z0-9_.]{1,}@[a-za-z0-9_]{1,}.[a-za-z0-9_]{1,}/;
if(email.match(pattern)==null){
return false;
}else{
return true;
}
}
\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
*/
public static void main(String args[]) {
myZOS = new ZipOutputStream (
new BufferedOutputStream(
new FileOutputStream("code.zip")));
writeOneFile("Example1.java");
writeOneFile("Example2.java");
writeOneFile("Example3.java");
myZOS.close();
}
static void writeOneFile(String name) throws IOException {
ZipEntry myZE = new ZipEntry(name);
myZOS.putNextEntry(myZE);
BufferedReader myBR = new BufferedReader(new FileReader(name));
int c;
while((c = myBR.read()) != -1)//read a char until EOF
myZOS.write(c);
myBR.close();
}
}
<head>