GithubHelp home page GithubHelp logo

string-substring's Introduction

String-SubString

Create your own class, input -> should be string, output -> method, should be return array of substrings.
output method -> get all the substrings between the open-close tags: "(", ")", "[", "]", "<", ">" from the string

Details:

  • in your class you can have only one method (output method)
  • instead of additional methods, you should create and use blocks
  • blocks can be as many as you want
  • use MRC
  • your code shouldn't have leak. (Check your code on - Liak. Your code shouldn't have - Leak, use for that suitable tool)

Test data strings:
String:
@"Prime Minister <Narendra Modi> tweeted a <link> to the speech (Human Resource Development Minister Smriti Irani) <made> in the Lok Sabha during the ((debate) on the ongoing JNU row) and the suicide of Dalit scholar Rohith Vemula at the [Hyderabad Central University]."
Result:
-> "Narendra Modi", "link", "Human Resource Development Minister Smriti Irani", "made", "debate", "(debate) on the ongoing JNU row", "Hyderabad Central University"

String:
@"Lorem <(ipsum [dolor <sit] amet), consectetur adipiscing elit>. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet>. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget (nulla. Class aptent <taciti [sociosqu ad] litora torquent per conubia> nostra), per inceptos himenaeos."
Result:
-> "(ipsum [dolor <sit] amet), consectetur adipiscing elit>. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet", "ipsum [dolor <sit] amet", "sit] amet), consectetur adipiscing elit", "dolor <sit", "nulla. Class aptent <taciti [sociosqu ad] litora torquent per conubia> nostra", "taciti [sociosqu ad] litora torquent per conubia", "sociosqu ad"

string-substring's People

Contributors

hackatonepm avatar rodionp13 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.