decompose a text field

good evening
i have a field
msg = "bureau 1000 xyz 25.12"
I would like to have
piece = "bureau"
code = "1000"
adr = "xyz"
temp = "25.12"
how to do?
best regards
pierre

strtok with a space as the delimiter.

Thank's
please an example
best regards
pierre

void setup() {
  char stringToParse[] = "Hello,Pierre,Here,is,Something,to,Parse,Bonne,fin,de,journee";
  const char *delim  = ",";
  char * item = strtok (stringToParse, delim);

  Serial.begin(115200);
  
  while (item != NULL)
  {
    Serial.println(item);
    item = strtok(NULL, delim);
  }
}

void loop() {}

sultan87:
Thank's
please an example
best regards
pierre

If you google strtok there are lots of examples of how to use it. I was assuming that you were capable of that.

good evening
this is a code C
i use python
would you like a exemple pour python
best regards
pierre

Pierre - this is the arduino forum here… and this is python 101…

well if that’s helpful - you could use split
(enfin… si ça aide)

uneListe = "coucou:papa:maman".split(":")
print uneListe  # affiche: ["coucou","papa","maman"]

# Set x to the first item in myList
# index of first item is 0
x = uneListe[0]
print x  # affiche: "coucou"

hello,
thank's
it's good
best regards
pierre