Guest User

Untitled

a guest
Jun 21st, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. public class RegexTest {
  2. public static void main( String args[] ) {
  3. String sentence = "This is a test of regular expressions.";
  4. System.out.println( sentence.matches( "\w" ) ? "Matches" : "Doesn't match" );
  5. }
  6. }
  7.  
  8. my $sentence = 'This is a test of regular expressions.';
  9. print ( $sentence =~ /w/ ? "Matches" : "Doesn't match" ) . "n";
Add Comment
Please, Sign In to add comment