LoginSignup
30
15

More than 1 year has passed since last update.

正規表現 | はてな ( ? ) と アスタリスク ( * ) の違い

Last updated at Posted at 2016-03-14

はてな

/Apple?/

最後の e はあってもなくても良い。
なので次の二パターンにマッチする。

  • Appl
  • Apple

アスタリスク

/Apple*/

最後の e はあってもなくても良い。
そして。e が何個連続していても良い。

なので次の無限パターンにマッチする。

  • Appl
  • Apple
  • Applee
  • Appleee
  • Appleeee
  • Appleeeee
  • Appleeeeee
  • Appleeeeeee
  • Appleeeeeeee
  • Appleeeeeeeee ...

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

メンター受付

30
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
30
15