-
Notifications
You must be signed in to change notification settings - Fork 319
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 oniguruma/doc/CALLOUTS.BUILTIN Lines 11 to 16 in ad44511
Let's assume it is In the following test, Backtracking of ' Alternatively, we could choose to make Below is the behavior of (Click to view) ( In Japanese)素晴らしい機能をありがとうございます。私は 以下のテストの場合、 " または 以下は私が過去に調べた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 It then skips to the next matching start position (after " While
(Click to view) ( 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, Click to view ( In Japanese )
ご検討ありがとうございました。 Kosako氏の判断に異論はありません。
これは
oniguruma/doc/CALLOUTS.BUILTIN.ja Lines 19 to 25 in 4ef8920
以下の @RedCMD さんのアイデアは 余談ですが、 |
Additional Information: Perl5 doc Perl5 doc (Japanese version) 特殊なバックトラック制御記号 |
This comment was marked as off-topic.
This comment was marked as off-topic.
[EDIT] WARNING: The following Perl result may be a bug.
|
@tonco-miyazawa |
( Japanese version of next comment )申し訳ないです、その点は理解出来ていたのですが翻訳英語では伝わりませんでした。
否定先読みの中の そのため、否定先読みの外側のマッチプロセスはマッチングを続行します。 先読みの外側のマッチプロセスもマッチに失敗した場合、 この動作は上記のPerlのテストで
"先読みの内側のマッチプロセスを終了させ、先読みの外側のマッチプロセスは終了しない" 現時点での私の認識では 以上のことから
今回は Kosako氏に誤った実装をさせてしまってもおかしくありませんでした。 |
@kkos (Owner) For berow reasons, the behavior of
If the Match-process outside of the look-ahead matches to the end, the result is successful. If the Match-process outside of the look-ahead fails, the position moves forward. In the above Perl test, if you change If the match process inside 'negative look-ahead' fails, then 'negative look-ahead' succeeds. [Added] Backtracking is required for The following are behaviors common to
At the moment I think the following:
I knew about this. Maybe my translation was wrong, sorry. |
I found that adding |
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