Skip to Content

Regular expression to find a string that begins with > and ends with }

Hi all,

May i know how to write regular expression to get the string that starts with > and ends with }

ex: in string : data>/ab/cd/peter} ; prop>/site/sing/perl};

want the string `>/ab/cd/peter}` and `>site/sing/perl}`.

i tried with this but not knowing how place a condition that starts with >

my findings:

(\/(\w+)\/)*(\w+)(@*)(\w+)(~*)((\w+)?)\/(\w+)\}

Regards,

kiran rachamalla.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Sep 07, 2018 at 06:17 AM

    For others happening upon this thread, a colleague recently pointed me to a neat demo-program with which REGEX expressions can be tested. It also includes a link to the help documentation:

    DEMO_REGEX_TOY

    As the name of the program implies you can really play with REGEX with it!

    Here is how it looks like for the example given:

    Cheers

    Baerbel


    Add comment
    10|10000 characters needed characters exceeded

  • Sep 06, 2018 at 12:20 PM

    Found the Answer ([^\>\}]*)\}

    Regards,

    kiran rachamalla

    Add comment
    10|10000 characters needed characters exceeded