Permalink
Find file
f1b07f8 Jul 3, 2016
38 lines (27 sloc) 819 Bytes

Parse tags

Description

You are given a text. Write a function that changes the text in all regions:

<upcase>text</upcase> to uppercase.
<lowcase>text</lowcase> to lowercase
<orgcase>text</orgcase> does not change casing

Note: Regions can be nested.

Input

  • The input will consist of an array containing one string

Output

  • The output should be consisted of one line

Constraints

  • Time limit: 0.2s
  • Memory limit: 16MB

Sample tests

Input

[ 'We are <orgcase>liViNg</orgcase> in a <upcase>yellow submarine</upcase>. We <orgcase>doN\'t</orgcase> have <lowcase>anything</lowcase> else.' ]

Output

We are liViNg in a YELLOW SUBMARINE. We doN't have anything else.

Submission

  • Submit your code here