Extract text from area text
Hi there_
I have an area text and would like to extract red numbers only
and copy to clipboard or to a new point type text.
How can I do this?
See image below!
Many thanks guys

Hi there_
I have an area text and would like to extract red numbers only
and copy to clipboard or to a new point type text.
How can I do this?
See image below!
Many thanks guys

Here is the link - 1.6MB Ai file
try this:
// find_8-digit-number.jsx
// https://forums.adobe.com/thread/1981373
// Extract text from area text
// regards pixxxel schubser
var txtString = app.activeDocument.textFrames[0].contents;
var searchString = /\bart[\s#:\t]+\d{8}/i;
var searchString2 = /\d{8}/g;
var found = txtString.match (searchString);
var showFound = found[0].replace(/\t/," ").replace(/\s+/," "); // this is only a cleaning for the prompt
var _8digitNumber = found[0].match (searchString2); // you can use this variable now for saving
prompt ("found this line:\n" + showFound + "\n\nHere is your 8-digit-Number", _8digitNumber);
Furthermore you will need a function to save your file in the format of your choice.
Have fun
![]()
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.