the simpler answer is:
Left ( Right ( Document Name ; 9 ) ; 8 )
but this, like your, suppose that the Document Name contains always a similar data.
In fact those calculations fail, as an example, when Document Name contains:
Form abcde (Rev. 044-12345 )
Which is a sure recurrent pattern for that data ?
supposing that the field's length is not always going to be the same and that ")" doesn't appear anywhere else in the field, I prefer to use the substitute function
Substitute ( Document Name ; ")" ; "" )
or if you need to remove the "Rev." portion, something like this -
Substitute ( Right ( Document Name ) ; 9 ) ; ")" ; "" )
The data is always to same. Your solution worked.
I changed the last value from 8 to 7.
You can also use:
RightWords ( text ; 1 )
Brackets (or any word delimiters, space, carriage return and a slew of others including parentheses) outside of xWords are always dropped automatically from either side. And numbers with dash between are treated as one word. And leading zeros are preserved.
UPDATE: So you end up with only the revision number of 044-12345
Thanks for the optional code. I'm learning a lot by testing these tips.
When it comes to text parsing, you'll find that there is usually at least three different ways that achieve the same results. Although this is a simpler example, you can get carried away with nested functions that grow into a debugging monster.