Wildcards support or regex matching in File Layout

Is it possible to use wildcards or regex to match methods starting with "On" in their names?
I want them to be always after my standard methods.

I tried this:

<Pattern>
  <Entry>
    <Match>
      <Kind Is="method"/>
      <Name Like="On[A-Z]*"/>
    </Match>
  </Entry>
</Pattern>
and that:
<Pattern>
  <Entry>
    <Match>
      <Kind Is="method"/>
      <Name Like="^On[A-Z].*"/>
    </Match>
  </Entry>
</Pattern>
but it looks like it doesn't detect matching methods.

Is it a bug or does it look like a feature request? ;)
0
3 comments

Maybe you could try with sth like this:

<Pattern>
  <Entry>
    <Match>
      <Kind Is="method"/>
      <Name Like="^On.*"/>
    </Match>
  </Entry>
</Pattern>

.* matches everything, so `On.*` should match On followed by anything. Maybe you could use + instead of * in case you have a method named only On and you do not want to move it to the special group

0

It still doesn't work :/
BTW. I used [A-Z] to indicate that I don't want matches with something like "OnboardEmployee".

0

Hey Trooperice,

Thank you for reaching Rider Forum.

To search for a certain patterns in regexp you may want try searching using double shift Search Everywhere feature. It lets you to look for a certain patterns (with regexp) and objects (classes, methods, members, etc).  You can find more details in our documentation: 

Search Everywhere

If you need the exact search with this XML construction you are using - could you please let me know the context of it? H~ow the search is made and how applied? 

Thank you in advance! 

 

0

Please sign in to leave a comment.