Skip to content
The Chat Archive
gpt-3.5-turbo-0613· OpenAI WildChat-4.8M (AI2)

hi, can you help me pls find regex to math data inside brases from this text <p>sdadasd…

  1. User

    hi, can you help me pls find regex to math data inside brases from this text sdadasd  {{field.dX00r1nXDQSh}}   {{field.dX00r1nXDQSh|cspu:"UV"}}   {{field.XH6ogfXuroS1|cspu:"UEV-44,UV"}}​​​​​​​​​​​​​​    {{field.ecH7TT7FseAw|cspu:"ST-true"}}​​​​​​​

  2. Assistant

    Sure! Here is a regex pattern that matches the data inside braces from the given text:

    \{\{([\w.-]+)\|[^{}]+?\}\}

    Explanation:

    • \{\{: Matches the opening braces {{ literally.
    • ([\w.-]+): Matches and captures one or more word characters, dots, and dashes. This will capture the data inside the braces.
    • \|: Matches the pipe symbol | literally.
    • [^{}]+?: Matches one or more characters that are not { or } in a non-greedy way. This will match the text inside the braces after the pipe symbol.
    • \}\}: Matches the closing braces }} literally.

    You can use this pattern with your regex engine of choice to extract the data inside the braces from the given text.