# Confusion between strings and numbers

**URL:** <https://forum.xojo.com/t/confusion-between-strings-and-numbers/88794>\
**Category:** General\
**Created:** [August 24, 2026, 1:41pm UTC](https://forum.xojo.com/t/confusion-between-strings-and-numbers/88794 "2026-08-24T13:41:04Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![Sascha\_S](https://forum.xojo.com/user_avatar/forum.xojo.com/sascha_s/32/22328_2.png) [@Sascha\_S](https://forum.xojo.com/u/Sascha_S)\
**Post date:** [August 26, 2026, 11:29am UTC](https://forum.xojo.com/t/confusion-between-strings-and-numbers/88794/18 "2026-08-26T11:29:25Z")

</div>

A RegEx i [posted in another Thread](https://forum.xojo.com/t/deleting-non-numeric-characters-from-a-string/88799/4), may be a bit better suited for your needs:

```auto
Var sourceText As String = "v. 15.4 → Naniser 12 8.333"
Var myDouble() As Double

Var rx As New RegEx
rx.SearchPattern = "(?mi-Us)\d+([.,]\d+)?"

Var rxOptions As RegExOptions = rx.Options
rxOptions.MatchEmpty = False
rxOptions.StringBeginIsLineBegin = False
rxOptions.StringEndIsLineEnd = False

Var match As RegExMatch = rx.Search( sourceText )
While match IsA RegExMatch
  
  myDouble.Add match.SubExpressionString(0).ToDouble
  
  match = rx.Search // Fetch the next match
Wend

```

This one extracts multiple decimals from any string.

---

_[View the full topic](https://forum.xojo.com/t/confusion-between-strings-and-numbers/88794)._
