Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.39 KB | None | 0 0
  1. open TEXT, "text1.txt";
  2. @text = <TEXT>;
  3. close TEXT;
  4. #B, C, D, F, G, H, J, K, L, M, N, P, Q, R, S, T, V, W, X, Y, Z
  5. $consonants = '[fhkprst]';
  6. $vowels = '[aeuo]*';
  7. $word = '\b(?:'.$vowels.$consonants.')+\b';
  8. # $exp = '\b(?:[aeuo]*[fhkprst])+\b';
  9.  
  10. for $el(@text)
  11. {
  12.   @arr = $el =~ m/$word/ig;
  13.   # print "@arr\n";
  14.   for $el2 (@arr)
  15.   {
  16.     push @res, $el2;
  17.   }
  18. }
  19. print "@res\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement