how to remove(strip) a character?
Dear users,
I want get only one letter from a string.
E.g.:
From Input1 just 1
From Output2 just 2
Does it work in MAX?
best,
prko
Have a look at [regexp], it's a bit complicated to understand but if you google "regular expressions" there are some excellent tutorials/manuals on the web.
lh
thanks!
This works as well and is easier to understand than regexp...
Hi !
I second thereishopeforus, regexp is a lot more powerful when well used.Here is another example and another solution.
Thanks!
I understand now the regexp better!!!!
It is very wonderful explanation.
My pleasure, happy to help
one more question!
how can I get only numbers from the following two stirings?
symbol "1, 2, 3, 4, 5, 6, 7, 8"
and
symbol "1 2 3 4 5 6 7 8"
Regretfully, I have not found the syntax for this case....
best,
prko
Try [regexp , @substitute " "] for the first example, replacing ,commas, with spaces. The second case just needs a [fromsymbol].
lh
Thanks!
My solution is as follows:
Be warned that your example will only work for single digit numbers, if your list was "23 -6 3.1415" it wouldn't work. Try something like [regexp -?\d+\.?\d*] to check for larger numbers, negatives and decimals, if you need to.
lh