Comments (12)
Man, this is weird. I don't have anything fancy.
from f2.
No, you should enclose the find expression in quotes:
$ f2 -f '((.*?))' -r '-'
from f2.
Thank you for your reply.
I am trying to match a pair of parenthesis and everything inside it, see
https://github.com/ayoisaiah/f2/wiki/Regular-expressions
((.*?)) Match a pair of parenthesis and everything inside
The above syntax will generate
bash: syntax error near unexpected token `('
Your suggestion in your reply from above will generate
f2 -f '((.*?))' -r '-'
INFO Failed to match any files
In this case
'Test (some text)' will remain unchanged when the expectation was for it to be changed to
'Test -'
Thank you
from f2.
@zz0rk You need to escape the outer parentheses:
from f2.
f2 -f '((.*?))' -r '-'
INFO Failed to match any files
I don't know what I am doing wrong here
from f2.
You're not including the backslash:
$ f2 -f '\((.*?)\)' -r '-'
from f2.
I've been copying and pasting the command directly from your comment into my terminal and also typed it manually. Same result.
I have noticed that when I preview this comment the backslash gets removed, so in fact the syntax I've been using was correct, but didn't pay attention that when the comment get's posted the backslash gets removed.
from f2.
@zz0rk That's weird, I'm unable to reproduce. What version of f2 are you using?
from f2.
I am running a current version of Debian 11. I've tested on a second box and I am getting the same results. I can upgrade to the latest version of F2 later today, but the version I am running right now doesn't work.
from f2.
Curiosity got the better of me... still no dice
from f2.
I just tested on Debian 11, same result for me. Are you using bash or some other shell?
from f2.
I'm going to close this issue, because I couldn't reproduce it on of my setups.
from f2.
Related Issues (20)
- [Help] How to match ISO date string HOT 2
- not working for me! HOT 3
- Fail to replace with RE HOT 3
- Data loss due to issue with --fix-conflicts HOT 6
- Cannot modify the file name of a file starting with '.' using .* matching? HOT 3
- [Question] Custom when fix conflicts HOT 1
- (Request) Making {%002d} more dynamically functional HOT 2
- Not working with basic regex? HOT 2
- Provide a GUI. HOT 1
- How to order numbers ORIGINAL correctly, for example 1 2 3 4 5 6 7 8 9 10? HOT 5
- Substitute from list HOT 12
- question bunch of files HOT 2
- Moving files to another directory outside starting path HOT 7
- Replace with case pattern HOT 1
- Donate via Patreon HOT 2
- Concatenate digits after a token number? HOT 4
- Regex end matcher `$` not working HOT 2
- [Docs] The Wiki Uses Incorrect Syntax HOT 2
- Feature idea - Set working directory HOT 2
- ==> ERROR: A failure occurred in f2_test HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from f2.