🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Filtering with whitespace regex not working

User: "AK"
New Altair Community Member
Updated by Jocelyn

I have nominal attributes Entity and EntityType. Entity contains a number of names of people and organizations. EntityType contains which type the Entity is (Organization or Person). I am trying to filter on EntityType == Person where Entity contains a full name. I want to omit single names.

 

I am using Filter Examples with attribute_value_filter. The string parameter is set as below.

EntityType = PERSON && Entity = [a-zA-Z]*\s.*

This does not select any of the names. I think I have isolated the issue to the whitespace character class within Entity. Any filtering on whitespace fails. For example, all of the below parameters failed to catch Bart Simpson.

Entity = Bart\sSimpson

Entity = Bart[ ]Simpson

Entity = Bart Simpson

 

However, the below worked.

Entity = Bart.+Simpson

 

Any ideas on how to match full names?

Below is an example of how I want my filter to work.

 

Input
Entity EntityType
Fox Network ORGANIZATION
Homer J. Simpson PERSON
Homer PERSON
Marge PERSON
Bart Simpson PERSON
Lisa Simpson PERSON

Desired Output
Entity EntityType
Homer J. Simpson PERSON
Bart Simpson PERSON
Lisa Simpson PERSON

 

Find more posts tagged with