Capture

Updated: 10/01/2023 by Computer Hope

Capture may refer to any of the following:

1. In computing, the term capture refers to obtaining information and putting it onto a storage device for future reference. For example, when highlighted text is cut or copied, it's captured and placed in the clipboard, allowing the user to paste the information elsewhere.

2. With OCR (optical character recognition), capture describes gathering picture or text data using a special scan. See our OCR page for further information.

3. With computer programming and regular expressions, capture describes grabbing matched text in parentheses in a regular expression and store it in a variable.

For example, in the below Perl code, the regular expression /([0-9]+)/ captures the first set of numbers it encounters going left to right in the $value variable.

my $value = "Nathan's number is 801-555-1234.";
if ($value =~ /([0-9]+)/) { print "Found area code: $1"; }

In the above example, it would return "Found area code: 801" when running the script, because it's the first found numbers found before running into a non-number (hyphen). Capturing text like this is a great way of grabbing and storing only the text you want in a variable.

4. With communications, capture describes saving information that's gathered during a data transfer to a file for archival or analysis.

$1, Capture board, Copy, Cut, Paste, Programming terms, Screen capture, Software terms