question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.exec() return only first result

See original GitHub issue

Hello. I have issue with returning all results to variable in JS. I build simple test, but when use

const SRL = require('srl');
const query = new SRL(query);
console.log(query.exec(query));

In console recieve:

[ 'What',
  'What',
  index: 0,
  input: 'What is Lorem Ipsum? ... ' ]

But what about all other? And why What is 2 times? Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
GeekEdemcommented, Sep 25, 2016

Oh, its great! Thank you very much!

2reactions
teabyiicommented, Sep 25, 2016

@GeekEdem I publish 0.2.0 to give more methods to use regex conveniently, you can upgrade package and check it out: https://github.com/SimpleRegex/SRL-JavaScript#additional

Read more comments on GitHub >

github_iconTop Results From Across the Web

Select statement only returning first row in result - Stack Overflow
It only returns the first row. However I would like it to return all results. I am new to SQL-Alchemy so forgive me...
Read more >
exec(3) - Linux manual page - man7.org
The exec() functions return only if an error has occurred. The return value is -1, and errno is set to indicate the error....
Read more >
shell_exec - Manual - PHP
This function can return null both when an error occurs or the program produces no output. It is not possible to detect execution...
Read more >
How to delete directories based on `find` output: ONLY the first ...
How to delete directories based on `find` output? I tried to remove only the first folder of result doing: find * -type d...
Read more >
Python's exec(): Execute Dynamically Generated Code
The exec() function's return value is None , probably because not every piece of code has a final, unique, and concrete result. It...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found