Could anyone of you please guide me on making correct regular expression to match the exact word or character
I have some numbers like 12345780 extn 1234
1234567 x 43545
13245678 Extn 454857
if [[ "$NUMBER" = *[x]* ]]; then
VAR3=`echo "$NUMBER" | nawk -F "[x]*" '{print $1 $2}'`
echo insideif
echo $VAR3
fi
Output is below:
inside if
12345780 etn 1234
insideif
1234567 43545
insideif
13245678 Etn 454857
---------- Post updated at 07:49 AM ---------- Previous update was at 05:27 AM ----------
Could anyone of you have any suggestion to match exact word using regular exp ?