Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はこの正規表現を持っています:
diff.\*\n.\*\n.\*\n.\*\n.\*\n
「diff」という単語から改行の 5 行目までをすべて一致させたいと考えています。誰かが私のためにそれを単純化できますか?
グループ化が必要です:
diff(?:.*\n){5}
私はあなたがこれを求めていると思います:
/diff(.*\n){5}/