Reputation: 39
I want to extract table.%%columnname%% info from a free text like below
GET_INFO(CUSTOMER1.%%NAME%%='TEST' AND CREDIT1.%%AMOUNT%%>1000)=1
The output i need is
CUSTOMER1.%%NAME%%
CREDIT1.%%AMOUNT%%
I have tried [a-zA-Z*][0-9].\%%.*?\%%
but it didnt give me the output i need
Upvotes: 0
Views: 52
Reputation: 626871
You can use
[a-zA-Z]*[0-9]+\.%%[^%]*%%
Details:
[a-zA-Z]*
- zero or more letters ([[:alpha:]]*
can also be used here)[0-9]+
- one or more digits\.
- a dot%%
- %%
string[^%]*
- any zero or more chars other than a %
char%%
- %%
stringUpvotes: 2