Skip to main content
2 of 4
deleted 6 characters in body
Costas
  • 15k
  • 24
  • 38

\w match "word" symbols (letters, digits and underscore) but in your example there is / after com which is not :alnum: so your pattern match nothing == empty output.

You can add / to pattern and look what is happend:

grep -oP 'com\/\K\w+'
Costas
  • 15k
  • 24
  • 38