Answered by:
Split Data - Regular expression exact match

Question
-
Hi
I am using the split data module in my experiment to filter my data set, what is the regular expression syntax for an exact string match ?
I am using:
\"ColumnA" string
But this does a contains & returns everything with 'string' in it, I want it to return the exact match only eg.
= 'string'
Cheers
Tuesday, December 5, 2017 4:07 PM
Answers
-
Hi,
Perhaps you can use the 'Apply SQL Transformation' module to do this filtering of records.
Example:
select * from t1 where t1.make="audi";
Sample experiment:
Regards,
Jaya- Proposed as answer by Jaya MathewMicrosoft employee Wednesday, December 6, 2017 2:56 PM
- Marked as answer by peterstilgoe Thursday, December 7, 2017 9:51 AM
Tuesday, December 5, 2017 10:07 PM -
You can use the symbol ^ to constrain the search string to the beginning of the string, and the $ symbol to specify that it occur at the end of the string.
For example, this expression returns rows that contain "Fred" anywhere in column myText
\"myText" Fred
This expression returns only the rows where "Fred" occupies all of column myText
\"myText" ^Fred$
- Proposed as answer by Jaya MathewMicrosoft employee Wednesday, December 6, 2017 2:55 PM
- Unproposed as answer by Jaya MathewMicrosoft employee Wednesday, December 6, 2017 2:56 PM
- Marked as answer by peterstilgoe Thursday, December 7, 2017 9:51 AM
Tuesday, December 5, 2017 11:59 PM
All replies
-
Oh I also interested in this oneTuesday, December 5, 2017 4:29 PM
-
Hi,
Perhaps you can use the 'Apply SQL Transformation' module to do this filtering of records.
Example:
select * from t1 where t1.make="audi";
Sample experiment:
Regards,
Jaya- Proposed as answer by Jaya MathewMicrosoft employee Wednesday, December 6, 2017 2:56 PM
- Marked as answer by peterstilgoe Thursday, December 7, 2017 9:51 AM
Tuesday, December 5, 2017 10:07 PM -
You can use the symbol ^ to constrain the search string to the beginning of the string, and the $ symbol to specify that it occur at the end of the string.
For example, this expression returns rows that contain "Fred" anywhere in column myText
\"myText" Fred
This expression returns only the rows where "Fred" occupies all of column myText
\"myText" ^Fred$
- Proposed as answer by Jaya MathewMicrosoft employee Wednesday, December 6, 2017 2:55 PM
- Unproposed as answer by Jaya MathewMicrosoft employee Wednesday, December 6, 2017 2:56 PM
- Marked as answer by peterstilgoe Thursday, December 7, 2017 9:51 AM
Tuesday, December 5, 2017 11:59 PM -
Thanks, knew it must have been something straightforward :)Wednesday, December 6, 2017 7:53 AM
-
Thanks, missed this module never knew it existed !Wednesday, December 6, 2017 7:53 AM
-
Good to hear this helps, thanks for the confirmation.Wednesday, December 6, 2017 2:55 PM