Extract specific string text within Parentheses

wrigst

New member
Local time
Today, 20:14
Joined
Feb 22, 2017
Messages
4
Hi All,

Recently joined this forum and searched for the answer tono avail (apologies now if the answer is here in another thread).

I have a field with a short text string that looks like this: "lastname, firstname (domain\username)". I want to extract the "username" portion of this text into a separate field. I have tried using the following expression, but I am left with the trailing parentheses:

Expr: Mid[fieldname], InStr([fieldname],"")

So I am getting what I asked for, but with extras! Is there another way to use the InStr function to omit the trailing parentheses or perhaps a completely different expression?

Thanks in advance
 
Something like this?
Code:
replace(mid([fieldname],instr([fieldname],"(")+1),")","")
 
Thanks sxschech - I seem to get an error with this expression "The expression you entered has a function containing the wrong number of arguments) - any ideas?

Appreciate your help guys
 
Thanks sxschech - I just realised that I had typed in your expression with a typo. Your solution worked perfectly - Many Thanks!!
 

Users who are viewing this thread

Back
Top Bottom