Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse regex search not working

Tags:

regex

eclipse

I am trying to find method usages of the following format <obj>.Apply(<arg1>,<arg2>)

So I search for this regex in my project resources: \.Apply\([^,]*?,[^,]*?\)

but this does not work.

As well as accepting <obj>.Apply(<arg1>,<arg2>) it also accepts for examlpe <obj>.Apply().

I have verified the regex works on regex101.com so I am not sure why this isn't working in eclipse?

The eclipse I am using is Eclipse IDE for C/C++ Developers, Version: Oxygen.3 Release (4.7.3), Build id: 20180308-1800, The project I am searching is a Go project using the GoClipse plugin.

like image 302
Lost Crotchet Avatar asked Jan 31 '26 23:01

Lost Crotchet


1 Answers

If you want only match .Apply(a1,a2) this part do this :

\.Apply\([^,)]+,[^,)]+[^,)]

https://regex101.com/r/ILKcsT/3/

like image 63
Mohammed Elhag Avatar answered Feb 04 '26 01:02

Mohammed Elhag



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!