Copy link to clipboard
Copied
Hello fellows,
When using the FM "Find" menu, is there a way to find an xref text range and select it?
Thanks!
Copy link to clipboard
Copied
According to the Help, at least some of the fields accept Regular Expressions, including ranges.
Copy link to clipboard
Copied
Hi Bob,
Thank you for your response. This statement is not clear. There are just a limited number of REGEX arguments that the Find function understands. A period (.) can select an xref in certain cases but it's not consistent.
Copy link to clipboard
Copied
Hi,
You can just select one of these Find items: Cross-Reference Any/Of Format/Unresolved
Then it will select the cross-reference.
Is this what you are looking for?
Best regards
Winfried
Copy link to clipboard
Copied
Hi Winfried,
Thank you for your response!
The xrefs are just part of the string I'd like to select and delete. The string looks like as follows:
(xref_string [digit:digit]), where the [digit:digit] part is just plain text.
The problem is that there are other xrefs of the same format which are not enclosed in parantheses that I need to keep intact.
Best Regards,
Roman
Copy link to clipboard
Copied
Hi Roman,
I do not think that you can automate this, at least not without a script.
Best regards
Winfried
Copy link to clipboard
Copied
Hi Winfried,
I'm afraid you are right. :- )
I just don't understand why a script can handle this using REGEX while the REGEX option in the Find menu cannot.
Best Regards,
Roman
Copy link to clipboard
Copied
Hi Roman,
With a script you can search for a combination of these:
specific cross-reference type
then check for the cross-reference text, also with regular expressions
text after the cross-reference, also with regular expressions
That's just too much for the Find in FrameMaker.
With scripts you have much more options!
ExtendScript isn't too difficult. However, when you need it not very often (as for me), you forget a lot after some months. Then I always have to calculate whether the problem is worth one day scripting.
Klaus Daube has a lot of very helpful ExtendScript resources!
Best regards
Winfried
Copy link to clipboard
Copied
Yap, you are right Winfried. Thanks!