I am having following string pattern and I want to split the text into 4 fields.
NIFTY21JUN11100CE --> NIFTY, 21JUN, 11100, CE
In above string, only 2 string formats are constant. For ex: 21JUN represents year and month and it is constant 5 character representation. Before that represent name which can be any number of characters. I think regex will be like (([1-2][0-9]))(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)
last 2 characters are constant and its value can be either PE|CE. value between 21JUN and CE|PE represent strike price and it is always numeric but can be any number of digits.
Now I want them to be split into 4 fields and struggling to get the regex. Is anyone familiar with Postgres command for this requirement?