title: Regular expression to capture alphanumeric string only in shell
body: <p>Trying to write the regex to capture the given alphanumeric values but its also capturing other numeric values. What should be the correct way to get the desire output?</p>
  <p>code</p>
  <pre><code>grep -Eo '(\[[[:alnum:]]\)\w+' file &gt; output
  </code></pre>
  <pre><code>$ cat file
  2022-04-29 08:45:11,754 [14] [Y23467] [546] This is a single line
  2022-04-29 08:45:11,764 [15] [fpes] [547] This is a single line
  2022-04-29 08:46:12,454 [143] [mwalkc] [548] This is a single line
  2022-04-29 08:49:12,554 [143] [skhat2] [549] This is a single line
  2022-04-29 09:40:13,852 [5] [narl12] [550] This is a single line
  2022-04-29 09:45:14,754 [1426] [Y23467] [550] This is a single line
  
  </code></pre>
  <p>current output -</p>
  <pre><code>[14
  [Y23467
  [546
  [15
  [fpes
  [547
  [143
  [mwalkc
  [548
  [143
  [skhat2
  [549
  [5
  [narl12
  [550
  [1426
  [Y23467
  [550
  </code></pre>
  <p>expected output -</p>
  <pre><code>Y23467
  fpes
  mwalkc
  skhat2
  narl12
  Y23467
  </code></pre>