Contain in Apache free marker

后端 未结 1 560
孤街浪徒
孤街浪徒 2021-01-17 06:18

I have below object returned by a particular function

    {\"count\":3,
      \"items\":[
       {
        \"organizationCode\": \"FP1\",
        \"organiza         


        
相关标签:
1条回答
  • 2021-01-17 06:47

    So the first step would be to accept the user input. Then if they include ' or " in their query, strip those characters off of their search. It's not necessary for this pattern. Once you've done that, you can use this pattern to find matches (?<=organization(?:Name|Code)":)\s+(?i)"T11". You'll want to replace the T11 portion of the pattern with whatever their stripped query is. This will not be case sensitive. If you need the pattern to be case sensitive you can remove the (?i).

    Demo

    0 讨论(0)
提交回复
热议问题