LoginSignup
0
0

More than 1 year has passed since last update.

Julia 文字列検索

Last updated at Posted at 2022-08-07

re.findall,matchallみたいなテキストを抽出するやつ

text="abcdefg"
collect(eachmatch(r"[a-c]",text)) #pythonで言うre.findall,旧juliaのmatchall

3-element Vector{RegexMatch}:
 RegexMatch("a")
 RegexMatch("b")
 RegexMatch("c")

@WolfMoonさんがコメントでご指摘するように
juliaのfindallはあるのですが位置になります。ありがとうございました。

参考図書

1から始めるプログラミング

Juliaプログラミングクックブック

天才プログラマー タンメイが教える Julia超入門

0
0
2

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
0
0