News

Tweets













SSIS Expression to Find Text Between Characters

It will be a super short and looks like the first and last post in January 2011.

So back to the topic, I decided to share an SSIS expression I crafted to extract the value concealed between two characters (I needed to get a portion of text in a file path):

Substring(@[User::MyString],FINDSTRING(@[User::MyString],"(",1)+1,FINDSTRING(@[User::MyString],")",1) - FINDSTRING(@[User::MyString],"(",1)-1)

The value of MyString say could be c:\test\test(testing123456789).txt, then the resulting text captured testing123456789.

Hopefully it will be needed to somebody.

Monday, January 31, 2011 12:14 PM

Feedback

# re: SSIS Expression to Find Text Between Characters

How could you then go about replacing that selected text? 5/22/2012 8:05 AM | FloridaGirl1218

# re: SSIS Expression to Find Text Between Characters

Thanks, this is very helpful. 7/20/2012 5:06 PM | Tom H

# re: SSIS Expression to Find Text Between Characters

Hi,
I am also searching for this expression.
Thank you so much for your post.
6/29/2014 5:22 PM | pratap reddy

Post A Comment
Title:
Name:
Email:
Comment:
Verification: