Copy just the values from Find All operation

Are you missing a feature? Request it's implementation here.
eeverman
Posts: 9

Copy just the values from Find All operation

Mon Aug 29, 2016 5:49 pm

It would be very handy to be able to copy just the values found when using the Find All tool.

Currently, copying the results of Find All from the results display tab copies all the meta data along with the results, making it impossible to get just the results.

Why would you do this? Say you have a text document with a bunch of product IDs and names in it. You want to get a list of just the names and IDs, so you do a Find All using a Regular Expressions like this:

Code: Select all

id: \d* name: .*$


I would hope get a list like this that I could copy for use somewhere:
id: 87234 widget_1
id: 78273 widget_2

Instead, if you copy and paste the results, you get something like the example below, which is pretty useless for any purpose that I can think of:
System ID: /datausgs/project_hosts/gcmrc/conf/Untitled4.sql
Description: 42 group_id,
Match: 42 group_id
Start location: 320:5
Offset: 11094
Length: 11

System ID: /datausgs/project_hosts/gcmrc/conf/Untitled4.sql
Description: 43 group_id,
Match: 43 group_id
Start location: 331:5
Offset: 11483
Length: 11
adrian
Posts: 2442

Re: Copy just the values from Find All operation

Wed Aug 31, 2016 12:37 pm

Hi,

The purpose of those lines of information is to pinpoint the location of the search results in the files.

We already have a feature request logged on our issue tracking tool for an action that copies the results as plain text. I've added your vote and comments.

BTW, isn't the value of "Match:" what you're looking for?
There is a workaround of sorts for copying a column from the results (via the Grid mode) here:
Copy column data from XPath results viewer?
In your case you just need the 'Match' column.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
jo3_11_5
Posts: 6

Re: Copy just the values from Find All operation

Mon Sep 05, 2016 9:20 am

I vote this feature request up.

What I normally do is :

  1. In Oxygen XML, select all search results.
  2. Copy.
  3. Paste into Notepad++.
  4. Open to Search > Mark dialog.
  5. Type in the search string, check Bookmark lines option and click Mark all.
  6. Go to Search > Remove Unmarked Lines.
adrian
Posts: 2442

Re: Copy just the values from Find All operation

Mon Sep 05, 2016 6:12 pm

I've added another vote.
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
eeverman
Posts: 9

Re: Copy just the values from Find All operation

Thu Sep 08, 2016 10:06 pm

It *is* possible to work with the resulting xml document to find what you need, as is the suggestion above. Its quite a kludge: Basically do your search, get the results as XML, then search/process the XML to get your actual results.

As a related issue: Regex searching lets you specify groups, ie:
<h4>(.*?)</h4>

Where the text you are looking for is actually what matches in the grouping expression: (.*?)
the <h4> is just literal text that delimits the text you are looking for.

It would be nice in the display and use of the results to include just the groups (the portion in parens) or the complete match.
adrian
Posts: 2442

Re: Copy just the values from Find All operation

Fri Sep 09, 2016 5:29 pm

Hi,

eeverman wrote:It would be nice in the display and use of the results to include just the groups (the portion in parens) or the complete match.
I'm afraid the results simply cannot hold the regexp groups information, besides you can already use a regexp to match the text without the delimiters:

Code: Select all

(?<=<h4>)(.*?)(?=</h4>)
zero width positive lookbehind (?<=...), searched text, zero width positive lookahead (?=...)

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
sorin_carbunaru
Site Admin
Posts: 145

Re: Copy just the values from Find All operation

Mon Mar 19, 2018 3:07 pm

Hello everyone,

I just wanted to let you know that in the recently released oXygen 20, in the contextual menu of the "Results" panel, there is now an action that copies the description text of the selected items (Copy description).

Best wishes,
Sorin Carbunaru
oXygen XML

Return to “Feature Request”

Who is online

Users browsing this forum: No registered users and 1 guest