Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # solution 1
- bash-4.2$ perl -lne 'print if (!/(.)(?=$1)/g && /.{10}/)' <<< 'abcdefghij'
- # solution 2
- bash-4.2$ perl -lne 'print if (!/(.)(?=\1)/g && /.{10}/)' <<< 'a b c d e '
- a b c d e
- bash-4.2$ perl -lne 'print if (!/(.)(?=\1)/g && /.{10}/)' <<< 'abcdefghij klmno pqrstuvwxyz'
- abcdefghij klmno pqrstuvwxyz
- # solution 3
- bash-4.2$ perl -lne 'print if ( /(.)(?!$1)/g && /.{10}/)' <<< 'abcdefghij'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement