Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class RegexTest {
- public static void main( String args[] ) {
- String sentence = "This is a test of regular expressions.";
- System.out.println( sentence.matches( "\w" ) ? "Matches" : "Doesn't match" );
- }
- }
- my $sentence = 'This is a test of regular expressions.';
- print ( $sentence =~ /w/ ? "Matches" : "Doesn't match" ) . "n";
Add Comment
Please, Sign In to add comment