Xide search

This forum is meant for questions and discussions about the X# language and tools
User avatar
Horst
Posts: 337
Joined: Tue Oct 13, 2015 3:27 pm

Xide search

Post by Horst »

Hello

A little request :-)

Sometimes i like to search in the code like -> #Objectdat+put+sina

Horst
User avatar
Chris
Posts: 4986
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: Xide search

Post by Chris »

Hi Horst,

Sorry, I did not understand what you mean. Can you please give me an example?
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
FFF
Posts: 1593
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

Re: Xide search

Post by FFF »

I suppose, he wants to "OR" some search terms.
What should be possible, if one uses the "Regex" checkbox (what i never tried, hadn't noticed this option is available...)
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
Chris
Posts: 4986
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: Xide search

Post by Chris »

Hi Karl & Horst,

Ah right thanks, in that case, that's what regional expression searching is for. If you don't want to learn how to construct regional expressions (I don't and don't want to!), that's one of the few usages of AI that I like, you can ask it "Get me a regional expression that searches for 'abc' and 'test'" !

But I see in XIDE I have not included regional expression support for regular search, that's only available in Search In FIles (the "Reg Exp" checkbox). You can use that and select for the option "Search In" only "Current File".
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Horst
Posts: 337
Joined: Tue Oct 13, 2015 3:27 pm

Re: Xide search

Post by Horst »

Hello Chris

How is the syntax to search ? i tried ' '#Objectdat .and. put .and. sina' in the searchfield and others.

you said only in the current file. i like to search in the whole project. So i can see , where i am using a database field (as example)

Horst
FFF
Posts: 1593
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

Re: Xide search

Post by FFF »

Horst,
first: The "regex" search is ONLY implemented für "Find in Files", not in "Find" - so, good for you.
second: #Objectdat .and. put .and. sina'
It's unclear, what you want to find here - probably all three of them will be somewhere in your prgs in the project. But "AND" usually servers to narrow the hit list, so i can't imagine, what the result in your case should look like...

My KI says:
(?=.*#Objectdat)(?=.*\bput\b)(?=.*\bsina\b)
might do, what you want - "It finds matches in a text that contains all three terms, regardless of the order or distance between them."
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
Horst
Posts: 337
Joined: Tue Oct 13, 2015 3:27 pm

Re: Xide search

Post by Horst »

Hallo Karl

i wanna find all lines with "SELF:odbSina:FIELDPUT (#ObjektDat"

Between fieldput and ( i have sometimes 1 space and sometimes more then 1 space and i tried (?=.*#Objectdat)(?=.*\bput\b)(?=.*\bsina\b) but doesnt work.

As i understand Chris it work in 'Find in files' but only in 'current file' not over the whole project so i dont need it.

Horst
FFF
Posts: 1593
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

Re: Xide search

Post by FFF »

Horst wrote: Sat Nov 09, 2024 10:40 am ...
As i understand Chris it work in 'Find in files' but only in 'current file' not over the whole project so i dont need it.
What Chris wrote: The regex option is only available in the Find in Files dialog. There you may restrict the search range to the current file, but the default is "Project", which is, as i think, what you want.
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
Chris
Posts: 4986
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: Xide search

Post by Chris »

Hi Horst,

Did you check the "Reg Exp" checkbox in the find in files dialog?
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Horst
Posts: 337
Joined: Tue Oct 13, 2015 3:27 pm

Re: Xide search

Post by Horst »

Hello Chris

Yes i did, search a long time and the result is empty
See the pic

Horst
Attachments
Screen.jpg
Post Reply