そのため、私はゲームのスクリプト言語の構文ハイライトを作成するための小さなプロジェクトに取り組んできました。数字という部分を除いて、すべて問題なく終了しました。
これらの行を例に取ってください
(5:42) Set database entry {healthpoints2} to the value 100.
(5:140) Move the user to position (29,40) on the map.
中括弧内の(5:42)または2を強調表示せずに、最後にその100を強調表示したいと思います。番号が常に同じ場所にあるとは限りません。また、番号が常に1つだけであるとは限りません。
私は基本的に言うために正規表現が必要です:
「{}の間になく、(#:#)パターンと一致しない数値を一致させます。」
私はこれに1日半います、そして私はそれを理解しようとして私の髪を引っ張っています。これを手伝っていただければ幸いです。私はすでにregular-expressions.infoを見て、 RegexBuddyで遊んでみましたが、うまくいきません:c
編集:リクエストに応じて、スクリプトエディタから直接コピーされた行がさらにいくつかあります。
(0:7) When somebody moves into position (**10** fhejwkfhwjekf **20**,
(0:20) When somebody rolls exactly **10** on **2** dice of **6** sides,
(0:31) When somebody says {...},
(3:3) within the diamond (**5**,**10**) - **20** //// **25**,
(3:14) in a line starting at (#, #) and going # more spaces northeast.
(5:10) play sound # to everyone who can see (#,#).
(5:14) move the user to (#,#) if there's nobody already there.
(5:272) set message ~msg to be the portion of message ~msg from position # to position #.
(5:302) take variable %var and add # to it.
(5:600) set database entry {...} about the user to #.
(5:601) set database entry {...} about the user named {...} to #.