Hi Team,
Need help in creating Regex for below -
Input -
Steps_taken “” loop
{
_1 “1st”
[
Subcat = “_1,_2,_3,_4,_5,_6,_7”
],
_2 “2nd”
[
Subcat = “_1,_2,_3,_4,_5,_6,_7,_98”
]
} fields -
(
slice "What were the steps you have taken from the time when the symptom appeared to when the pain was addressed? Select the steps in the sequence that you took the action.
You may repeat each step more than once but need not fill up all 10 steps.
{@}"
[
metatype = “rowpicker”,
row$all$center = true
]
categorical [1…1]
{
List_BroadstepsQ33 use \.List_BroadstepsQ33 -,
_98 “That’s all”
[
CAT = “_2,_3,_4,_5,_6,_7,_8,_9,_10”,
value = 98
]
fix exclusive
} ran;
) expand grid;
Output -
slice "What were the steps you have taken from the time when the symptom appeared to when the pain was addressed? Select the steps in the sequence that you took the action.
You may repeat each step more than once but need not fill up all 10 steps.
{@}"
[
metatype = “rowpicker”,
row$all$center = true
]
categorical [1…1]
{
List_BroadstepsQ33 use \.List_BroadstepsQ33 -,
_98 “That’s all”
[
CAT = “_2,_3,_4,_5,_6,_7,_8,_9,_10”,
value = 98
]
fix exclusive
} ran;
There can be multiple instances of such pattern in a text file.
I need to delete 2 part here -
- From the beginning of the line containing keyword ‘loop’ till keyword ‘fields -’
- Opening bracket (which will always be there below the line containing ‘fields -’) and closing bracket (which will always contain keyword ‘grid;’)