Skip to content
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

The Vimscript use a wrong regex sample #5200

Open
uudicet opened this issue Dec 2, 2024 · 0 comments
Open

The Vimscript use a wrong regex sample #5200

uudicet opened this issue Dec 2, 2024 · 0 comments

Comments

@uudicet
Copy link

uudicet commented Dec 2, 2024

In the line 112-118.
The sample put the pattern and string in wrong place, so the match test always false, the unmatch test always true.
I think the follow is better:

echo  "hello" =~  "He"    | " Regular expression match, uses 'ignorecase'
echo  "hello" =~# "He"    | " Regular expression match, case sensitive
echo  "hello" =~? "He"    | " Regular expression match, case insensitive
echo  "hello" !~  "He"    | " Regular expression unmatch, use 'ignorecase'
echo  "hello" !~# "He"    | " Regular expression unmatch, case sensitive
echo  "hello" !~? "He"    | " Regular expression unmatch, case insensitive
@uudicet uudicet changed the title The The Vimscript use a wrong regex sample Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant