Extract text

The problem is extract somo patterns in text file

INPUT="text (value1) text (value2) text (value3) text"

solving with:

Grep

grep -o '([^)]*)'

Vim

Capitalize the first letter of each word in a selection ?

  • \< matches the start of a word

  • . matches the first character of a word

  • \u tells Vim to uppercase the following character in the substitution string (&)

  • & means substitute whatever was matched on the left-hand side

  • g means substitute all matches, not only the first


Last update: Sep 04, 2025