problem with regex

Visual manipulations and refinements
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
weedlili
Posts:11
Joined:03 May 2011 15:02
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
problem with regex

Post by weedlili » 12 May 2011 09:29

Hello,

I use a regex tested here and there to filter my graph on a quite huge attribute. It works fine on these websites but not on Gephi (nothing is selected when I click on "select").

I chose Filters>Attributes>Equal>My_attribute>, then entered my regex, clicked OK, then SELECT.

Is there a special syntax? Here is my regex: [0-9a-zA-Z. \(\)]+[P|p]hylogen[0-9a-zA-Z. \(\)]+

Thanks,

W.

weedlili
Posts:11
Joined:03 May 2011 15:02
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: problem with regex

Post by weedlili » 12 May 2011 10:20

Ok, seems that the websites I used where not that trustable...
Everything works fine in Gephi too when I use

([0-9a-zA-Z.'\[\]\?\-&;:\ \(\)]+)?(?i)phylogen([0-9a-zA-Z.'\[\]\?\-&;:\ \(\)]+)?

I keep my post online in case it could help someone.

pschmidtke
Posts:1
Joined:25 Jun 2011 01:09
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: problem with regex

Post by pschmidtke » 25 Jun 2011 01:28

It would be really great if this syntax could be rendered easier. Right now, filtering for strings really isn't trivial, but it's often required.

I think something like

*query* should do the far too complex regex.

;)

elijah
Gephi Community Support
Posts:169
Joined:11 Sep 2010 18:09
Location:Stanford, CA
Contact:

Re: problem with regex

Post by elijah » 27 Jun 2011 17:59

There should be an SQL-equivalent LIKE query to find occurrences of a string.

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable