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.
no = ereg_replace(" .*", "", $command[$i]);C# で$ と同等のものを使用する方法を知る必要があります。私はパターン マッチングの初心者です。C# でのパターン マッチングの例を教えてください。
no = ereg_replace(" .*", "", $command[$i]);
正規表現を使用できるかもしれません。
この例では、文字列内にあるすべての HTML タグを削除したいと考えています。
string newDescription = Regex.Replace("hello how are <b>you</b>", "<[^>]*>", string.Empty);
新しい説明に「こんにちは、お元気ですか」が追加されました