-
Notifications
You must be signed in to change notification settings - Fork 316
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
add new operator \J (skip search) #278 #299
base: master
Are you sure you want to change the base?
Conversation
thank you will |
/a+\Jb/ match with "aaaaaaab". |
@kkos (Owner) Thank you for adding this great feature. I would like to use the "retraction only" version of /doc/CALLOUTS.BUILTIN : oniguruma/doc/CALLOUTS.BUILTIN Line 11 in ad44511
Let's assume it is Then, the following will have the same effect as
or
In the following test, backtracking on "
Alternatively, we could choose to make Below is the behavior of =========================================================== 素晴らしい機能の追加をありがとうございます。 私は /doc/CALLOUTS.BUILTIN : oniguruma/doc/CALLOUTS.BUILTIN Line 11 in ad44511
それを すると、以下はperl5の
or
以下のテストの場合、 "
または 以下は私が過去に調べたperl5の |
I read it, but did not clearly understand the SKIP specifications. I noticed that there is no need to use the operator \J. |
Sorry, I didn't explain it well. When backtracking reaches In the following test,
Backtracking reaches In this case, so " It then skips to the next matching start position (after " As a result, this test returns " This behavior of immediately ending Match-process at the current position is the same as While Below is a sample code in Perl5.
( In Japanese ) すみません、説明不足でした。 Perl5 の 以下のテストの場合、 " そして次の照合開始位置 ( " この現在位置での照合を即座に終了させるという動作は
以下は Perl5 のサンプルコードです。
|
I don't feel that the ability to exit when backing out is essential to (*SKIP). |
@kkos (Owner)
Thank you for your consideration. I have no objection to your decision.
It seems that this can be achieved by simply rewriting
Similarly for
oniguruma/doc/CALLOUTS.BUILTIN Lines 19 to 26 in 00ad92b
The idea below from @RedCMD is an alternative to As an aside, perlre.pod : ( In Japanese )
ご検討ありがとうございました。 Kosako氏の判断に異論はありません。
これは
oniguruma/doc/CALLOUTS.BUILTIN Lines 19 to 26 in 00ad92b
以下の @RedCMD さんのアイデアは 余談ですが、 perlre.pod : |
For "aaa..." (9000 chars)
/a+b/
real 0m0.174s
user 0m0.168s
sys 0m0.004s
/a+\Jb/
real 0m0.007s
user 0m0.002s
sys 0m0.004s