multiple on special characters
See original GitHub issueHi, 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:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
Yep, with this version it’s working.