Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

Regex with multiple lines

0 votes
It looks like you've recently added the ability to search and select objects using regex. I have node labels that contain multiple lines. This could be due to not using the correct syntax and if so then any hints would be appreciated. Do you support regex over multiple line node labels? So far my testing with the regex node select options seem to indicate that I have to account for every possible character. It won't return a match if I search for ABC if the string contains " ABC" without adding regex for the space (which works once added). So far I can't get it to work if ABC is on the second line of text though.
in Help by
recategorized by

1 Answer

0 votes

Re:

Do you support regex over multiple line node labels?

Yes, however you probably need to use multiline mode or dotall mode if your expression has to match multiple lines. E.g. the expression "(?s).*ABC.*" (without the quotes) matches any text that contains the substring "ABC" (again without the quotes).
Please see the Pattern API documentation for information on the required regular expression syntax.

 

Re:

So far my testing with the regex node select options seem to indicate that I have to account for every possible character. It won't return a match if I search for ABC if the string contains " ABC" without adding regex for the space (which works once added).

Yes, you will have to account for any character. This feature does not search for substrings - it matches text against a regular expression.

by [yWorks] (161k points)
Legal Disclosure | Privacy Policy
...