Skip to content

Regex corner case #2

@skeggse

Description

@skeggse

Likely inherent from limitations of javascript's regex implementation, this module does not handle greedy regular expressions (there are also probably other variants that are problematic).

// logs null [ 'one', '', 'two' ] instead of null [ 'one', 'two' ]
pull(
  pull.values(['one\n', '\ntwo']),
  split(/\n+/),
  pull.collect(console.log));

It seems difficult to appropriately handle this, so perhaps we should simply document this shortcoming?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions