Hello Dojo,
I am trying to create a regex where when a user selects "Other" as a filter, it filters out all statuses that are not Online or Offline. The regex I have created is: ^(?!(Online|Offline)).*
This regex works on Regex101.com, but does not work when applying it to the ClientSideRowFilter.
In my investigation, I found a regex we use to show all "Not Online" statuses as: !(online) and this regex works, though it does not look valid.
So I guess there are two questions:
- What is the best website to test regex for Visio?
- What would be the best regex to filter out all Online and Offline statuses using a ClientSideRowFilter?
Thank you in advance.
Hi Gabriel,
- Regex101 does not contain the .Net flavor (see their GitHub). You can use http://regexstorm.net/tester though.
- I believe you're pretty close with the regular expression: ^(?!(Online|Offline)) should work.
Note that your shape data should look something like this:
ClientSideRowFilter:"Column name":Regex=^(?!(Online|Offline))
That’s because !(online) is probably not the regex you want it to be… The exclamation mark is a regular character unless it’s used in a different construction like (?!). The reason it probably fails in the shape data is because the pipe is a common separator for the Visual Overview.
So I just got it working, I had the separator change for the execute/regex replace, but not on the ClientSideRowFilter. But, the regex you provided did not work and the one that did work was !(Online|Offline)
I find it very weird because as you said, it should match on ! as a character and not as a condition.
That doesn’t seem right. I suggest this gets investigated as you might be relying on a software issue which might be fixed later on.
Hey Sebastiaan, so the first website still did not work with the !(online) regex and the regex you proposed did not work either. I did notice though that when I put in the filter “Status”:regex=!(Online|Offline) in the native Dataminer filter, it was filtered properly, but the moment I added that filter to the ClientSideRowFilter, it did not work