LeafRef Path not working

We have a trouble in defining the leafref with predicate

leaf networkSegmentName {

type leafref {
path “/NS_TABLE:networkSegmentTable[NS_TABLE:name in /ADDRESS_CONTEXT:addressContext/IP_INTERFACE:ipInterfaceGroup[IP_INTERFACE:name = current()/…/ipInterfaceGroupName]/IP_INTERFACE:ipInterface/IP_INTERFACE:networkSegmentName]/NS_TABLE:ipNameV6/NS_TABLE:name”;
}
}

leaf ipInterfaceGroupName {
type string
tailf:info "
IP interface group used by this SIP Signaling Port.
";
}

NetworkSegmentTable (name is the key for this table) has the list of ipNameV6 names.
NetworkSegmentTable is attached to ipInterface.

I want to get all the ipNameV6 names to be referenced here, but i want to filter the network segment table whose names matches another path.
[NS_TABLE:name in /ADDRESS_CONTEXT:addressContext/IP_INTERFACE:ipInterfaceGroup[IP_INTERFACE:name = current()/…/ipInterfaceGroupName]/IP_INTERFACE:ipInterface/IP_INTERFACE:networkSegmentName]

note that there is match of ipInterface group in the filter.

When i am compiling getting error saying invalid path, Can you please help us understand what is going wrong here?

Predicates in a leafref path, if any, must take the form [keyname = value], as required by the RFC 7950. You need to express complex constraints as must expressions.