-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Underscore nullifies/ignored in replacement between matched groups #34
Comments
It's a common issue. see #33 |
Apologies I missed that issue when I did a quick search. |
No worries, it happens a lot. I really have to add this to attention or FAQs. |
Added:
|
Thank you @shenwei356 ! If I may offer a suggestion on the wording:
I hope you don't mind the correction. Thank you again for taking the time to respond to my issue so quickly. |
Thank you Ammar very much! |
That's super interesting. I can see how the word 'should' can be a bit forward. I generally avoid the word as it's ambiguous but I couldn't think of another way to phrase it. Thanks again! |
"recommended to be" might be a good alternative. |
Hi Shenwei,
Thanks for the awesome. I came across a weird issue. I am trying to replace this pattern:
Input:
Expected output:
I want to move
S\d\d
pattern from the middle to the first of the string. eg this:XXX_XXX_S17_R1.fastq.gz
becomesS17_XXX_XXX_R1.fastq.gz
.Command I used:
Output:
Odd!
_
seems to completely nullify the group string eg$1
Replacing underscores with
-
fixes this issue:To me the issues seems to be replaced to the regex groups. Because when I run this to achieve the desired result it works:
Thanks!
Versions:
The text was updated successfully, but these errors were encountered: