Giter VIP home page Giter VIP logo

lang's Introduction

lang

An extension of regex which makes it easy to match, replace, and split complex expressions like strings with escape characters and embedded brackets, match around these types of expressions, or delimit these types of expressions with other complex expressions.

Examples

Split a string 'string' by a regex 'regex' while ignoring delimiters created by the regex 'ignore'

split(string, regex, ignore)

Split a string 'string' by a regex 'regex' while ignoring delimiters created by the regex 'ignore' while also ignoring embedded delimiters created by the start token 'start' and end token 'end'

split_delims(string, regex, start, end, ignore)

Replace all matches of a regex 'regex' in a string 'string' with a string 'replacement' while ignoring delimiters created by the regex 'ignore'

replace(string, regex, replacement, ignore)

Replace all matches of a regex 'regex' in a string 'string' with a string 'replacement' while ignoring recursive delimiters defined by the start pattern 'start' and end pattern 'end' while also ignoring non-recursive delimiters created by the regex 'ignore'

replace_delims(string, regex, replacement, start, end, ignore)

Match a section of a string 'string' with a start pattern 'start' and end pattern 'end' while ignoring non-recursive delimiters created by the regex 'ignore'

matchSection(string, start, end, ignore)

lang's People

Contributors

stevengeeky avatar

Watchers

 avatar  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.