# Dash (-) in selector's name is ignored

**URL:** https://discourse.paraview.org/t/dash-in-selectors-name-is-ignored/13655
**Category:** ParaView Support
**Created:** [January 9, 2024, 11:35am UTC](https://discourse.paraview.org/t/dash-in-selectors-name-is-ignored/13655 "2024-01-09T11:35:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![alie89](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/c89c15/32.png) [@alie89](https://discourse.paraview.org/u/alie89)
#### Post date: [January 9, 2024, 11:35am UTC](https://discourse.paraview.org/t/dash-in-selectors-name-is-ignored/13655/1 "2024-01-09T11:35:06Z")

</div>

Hello,

I just would like to flag a bug or at least I believe so. In vtkMultiblockDataSet, the dash inside names is ignored while using selectors.

For example:

```auto

my_filter.Selectors = ['test-1']

```

does the same selection as:

> my\_filter.Selectors = [‘test1’]

The annoying thing is that if you have a data set with some coordinate in the name (e.g. x\_-1, x\_0, x\_1), selecting only x\_-1 would trigger the selection of the x\_1 at the same time.

You can find this behaviour in the latest nightly version of Paraview.

Let me know if you know a workaroud to this for the time being 🙂

Thank you very much

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 9, 2024, 12:07pm UTC](https://discourse.paraview.org/t/dash-in-selectors-name-is-ignored/13655/2 "2024-01-09T12:07:09Z")

</div>

Looks like a bug, could you open an issue ?

[https://gitlab.kitware.com/paraview/paraview/-/issues](https://gitlab.kitware.com/paraview/paraview/-/issues)

---

<div class="post-metadata">

### Author: ![alie89](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/c89c15/32.png) [@alie89](https://discourse.paraview.org/u/alie89)
#### Post date: [January 9, 2024, 1:03pm UTC](https://discourse.paraview.org/t/dash-in-selectors-name-is-ignored/13655/3 "2024-01-09T13:03:00Z")

</div>

Sure, done.

Thank you Mathieu

---

<div class="post-metadata">

### Author: ![alie89](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/c89c15/32.png) [@alie89](https://discourse.paraview.org/u/alie89)
#### Post date: [January 10, 2024, 8:01am UTC](https://discourse.paraview.org/t/dash-in-selectors-name-is-ignored/13655/4 "2024-01-10T08:01:06Z")

</div>

Hi,

I found a workaround to this issue (python version), I am posting here a snippet just in case somebody needs it:

> selectors = [f"//\*[contains(@label,‘{x}’)]" for x in names]  
> `extractBlock.Selectors = selectors`

Please note that if you put that expression directly in the filter’s constructor, it woul prepend /Root/ and the trick does not work. You need to hard reset the selector’s list like above to get what you want.

Cheers
