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.
ここに私のコードがあります:
<html> titi <? print "toto"+"<br>" ?> <html>
<? and ?>そして、私が見つけた唯一の正規表現の間の行のみが必要です:
<? and ?>
<?.*\n*?\?>
しかし、それは最初のものを欠いています<?
<?
だから誰かがそれが私を夢中にさせる考えを持っているなら...すべての人に敬意を表し、感謝します。ブシエール
最初にエスケープする必要があります?:
?
<\?.*\n*?\?>
この正規表現はより堅牢になると思います:
<\?.*?\?>
(複数行オプションを指定すると、.改行にも一致します)
.
最初の疑問符の前にバックスラッシュを追加する必要があります (また、正規表現の複数行モードを使用する必要があります)。
最初のエスケープ ?