Git Product home page Git Product logo

stringregexpsplit's People

Contributors

genius257 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

stringregexpsplit's Issues

Usage of Not operator with string comparison is wrong due to AutoIt3 operator presidence

If (Not BitAND($PREG_SPLIT_NO_EMPTY, $iFlags)) Or (Not $sValue == "") Then

In AutoIt3, the Not operator has higher prescience than the equals sign, so Not $sValue == "" is handled like (Not $sValue) == "" instead of expected Not ($sValue == "")

please note that this is not true when using single equal.

Example code to reproduce problem:

StringRegExpSplit("resource(1) of type (Ptr)", "(.*\R)", 0, BitOR($PREG_SPLIT_DELIM_CAPTURE, $PREG_SPLIT_NO_EMPTY))

expected result:

["resource(1) of type (Ptr)"]

but in version v1.0.1 the result is:

[]

Limit isn't respected with $PREG_SPLIT_DELIM_CAPTURE

The code doesn't count the delimiters as part of the limit as seen with this code:
StringRegExpSplit("0,1,2,3,4,5,6,7,8,9", "(\|)", 2, $PREG_SPLIT_DELIM_CAPTURE)
StringRegExpSplit("0|1|2|3|4|5|6|7|8|9", "(\|)", 2, $PREG_SPLIT_DELIM_CAPTURE)

Expected: ["0", "|", "1|2|3|4|5|6|7|8|9"]

Actual: ["0", "|", "1", "|", "2|3|4|5|6|7|8|9"]

Edit: Forgot to escape pipe in delimiter and used wrong example

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.