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.
C# で次の文字列を分割できる正規表現が必要です。
製品名 : 製品名 テキスト adfasd asdfas 数量 : 1 ベース価格 : 999.00 ベンダー製品 ID : text-text-text-text
製品名 : 製品名 テキスト adfasd asdfas 数量 : 1 ベース価格 : 999.00
ベンダー製品 ID : text-text-text-text
この結果を得るために
text text text text
「-」が2回から5回繰り返される
注: このパターンは大きなパターンの一部であるため、string.split は使用できません
私はこれを試します(-?(.+?)?-?(.+?)?-?(.+?)?)\s
(-?(.+?)?-?(.+?)?-?(.+?)?)\s