I am working on linux scripts and want to extract a substring out of a master string as in the following example :-
Master string =
2011-12-03 11:04:22#Alex#Audrino^13b11254^Townville#USA#
What I require is :-
Substring =
13b11254
I simply want to read and extract whatever is there in between ^ ^ special characters.
This code will be used in a linux script.
POSIX sh compatible:
Assumes that
^is only used 2x per string as the 2 delimiters.