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.

multiple on special characters

See original GitHub issue

Hi, I think it’s not possible to use the special characters together with mutlitple. Is that a bug?

I expected the following to work, but it gives a TypeError: exp.find('<a').whitespace().multiple().then('>') Wrapping the whitespace in a group didn’t help either.

I tried it in other ways but then I got some interesting results: exp.find('<a').then('\s*').then('>') This actually returns: /(?:<head)(?:s\*)(?:>)/gm (notice the switched backslash) And: exp.find('<a').add('\s*').then('>') actually requires a double slash \\s* in the add method.

Can someone help me out please? What is the correct way to check for 0 or more whitespaces? Ps.: Sorry if I’m missing something obvious here.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lukas-dachtlercommented, Nov 21, 2018

Thanks again for your great help @shreyasminocha! 👍 I’ll check back later in the day after the PR is through and will then update back to the newest version in my project.

0reactions
lukas-dachtlercommented, Nov 21, 2018

Yep, with this version it’s working.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to allow only one special character multiple times in a ...
I am trying to create a REGEX expression that will only allow alphanumeric characters and one special character that can be used multiple...
Read more >
Python | Split multiple characters from string - GeeksforGeeks
Method 1: Split multiple characters from string using re.split() ... List of special characters that need to be escaped before using them:
Read more >
“Multiple” special character replacements in “Multiple” columns
Our list here is the list of special characters in the PDFs. We create a list of them by first setting up a...
Read more >
Split a String with multiple Separators using JavaScript
The `split` method can be passed a regular expression containing multiple characters to split the string with multiple separators.
Read more >
Replacing multiple characters in a string - Informatica Network
hi, how can I replace multiple characters in a string. I used a lookup, but it replaces my whole string if it finds...
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