Is there any better and easy method to match this.I have written the regular expression like this, if ($content =~/\?XML\s+version=[\'\"]1.0[\'\"](\s+encoding=[\'\"][^\' +\"]*[\'\"])?/){ print"Input file is valid"; }else{ print"File is invalid"; }
In reply to Regular expression to check XML type by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |