How get text sensor value to subtract into two parts ?
Value is “A 1234” and i want only 1234 part remain, how can it be done?
Is it possible via Filters?
What patterns are always present and how do you want to process it?
E.g do you always want all text after the first space?
Or do you want to strip out all non numeric characters etc?
If you want to split on a separator you’ll likely use a lambda similar to the one here:
Key parts being sscanf.
1 Like
found one easy way
filter and replace to nothing
filters:
- substitute:
- "A -> "
That will not do anything to A 1234
1 Like
“A 1234” + filter = result “1234”
filters:
- substitute:
- "A -> "
Is the character to be filtered always “A”
If so, why post the answer as involving “Z”?