cat 'Extract Text Output.rtf' | sed -n 's/Order Number : \(.*\)\\/\1/gp'
Yields exactly what you want.
Explanation:
sed -n
suppress default output of seds/.../.../g
search and replace, g: everything/globallyOrder Number : \(.*\)\\
look for "Order Number :
" string and abackslash
and save anything in between to group 1; (downside of using sed is to have to escape regex's grouping operator:(...)
with\(...\)
)\1
use group 1 as replacementp
print replacement if any match
This is way more flexible and generic than using hard-coded awk groups ($7).
Note 1: use .*? if you have lines formatted like this:
\cf2 Fab Order Number : FAB00772450\ \b \cf2
This prevents regex from being greedy and stops at the first backslash. Not tested if sed supports *? and +? operators, but let's hope.
Note 2: If you have multiple parts you want to extract from a line, use multiple groups and in the replacement string you can even switch them with formatting, like .../\2 - \1/