# Quickest method to convert Vector of Strings to 3 Vectors of Floats

**URL:** https://discourse.julialang.org/t/quickest-method-to-convert-vector-of-strings-to-3-vectors-of-floats/31522
**Category:** General Usage
**Created:** [November 26, 2019, 9:09am UTC](https://discourse.julialang.org/t/quickest-method-to-convert-vector-of-strings-to-3-vectors-of-floats/31522 "2019-11-26T09:09:50Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)
#### Post date: [November 27, 2019, 4:48pm UTC](https://discourse.julialang.org/t/quickest-method-to-convert-vector-of-strings-to-3-vectors-of-floats/31522/3 "2019-11-27T16:48:32Z")

</div>

Here are some more examples on how to do it in other ways:

> [@Best way to get all substrings or numbers matching a regex](https://discourse.julialang.org/t/best-way-to-get-all-substrings-or-numbers-matching-a-regex/31571):
>
> Bonjour, What is the best way for getting a String on Number Vector from a regex (like with the old matchall method)? pat = r"[+-]?\d+\.?\d\*" txt = "aaa -1 bbb +2.2 ccc 123.456 ddd" # findall? ranges = findall(pat, txt) words = map(range-\>txt[range], ranges) # could be shorter? numbers = parse.(Float64, words) # =\> # 3-element Array{Float64,1}: # 1.0 # -1.0 # 123.456 # eachmatch? matches = eachmatch(pat, txt) words = getfield.(matches, :match) numbers = parse.(Float64, words) # =\>…

(i case you don’t follow the discourse)

---

_[View the full topic](https://discourse.julialang.org/t/quickest-method-to-convert-vector-of-strings-to-3-vectors-of-floats/31522)._
