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.
正規表現は初めてです。
誰でも私に例をあげることができます:^ [DR] \ d {4} $
ありがとう。
^[DR]\d{4}$意味:
^[DR]\d{4}$
^ - テキストの先頭 [DR] - 文字「D」または「R」 \d - 数字 {4} - 最後のパターンが 4 回繰り返されました $ - テキストの終わり
^ - テキストの先頭
[DR] - 文字「D」または「R」
\d - 数字
{4} - 最後のパターンが 4 回繰り返されました
$ - テキストの終わり
例: R1234