khfaraaz82@gmail.com | c526fe9 | 2012-08-10 22:09:13 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Description : Test matches string function using regular expressions |
| 3 | * Expected Res : Success |
| 4 | * Date : May 21 2012 |
| 5 | */ |
| 6 | |
| 7 | write output to nc1:"rttest/string_matches06.adm"; |
| 8 | |
| 9 | for $a in [matches("mnop","."), |
| 10 | matches("abcdefABCDEF","/d"), |
| 11 | matches("12345","\d"), |
| 12 | matches("abcdefGHIJK","\D"), |
| 13 | matches(" ","\s"), |
| 14 | matches(" ","\S"), |
| 15 | matches("Welcome to pattern matching!","[a-zA-Z_0-9]"), |
| 16 | matches("!@#$%^&*()","[a-zA-Z_0-9]"), |
| 17 | matches("!@#$%^&*()","[^\W]"), |
| 18 | matches("!@#$%^&*","[^\w]"), |
| 19 | matches("0xffff","[\p{XDigit}]"), |
| 20 | matches("FFFFFFFF","[\p{XDigit}]"), |
| 21 | matches("abcdefgh","[\p{javaLowerCase}]"), |
| 22 | matches("ABCDEF","[\p{javaLowerCase}]"), |
| 23 | matches(codepoint-to-string([0163]),"[\p{Sc}]")] |
| 24 | return $a |
| 25 | |