extract
Ein All-in-One-Extractor mit über 50 Funktionen, die häufige Fälle abdecken, von E-Mails und Telefonnummern bis hin zu URLs und Hashes.
Ein All-in-One-Extractor mit über 50 Funktionen, die häufige Fälle abdecken, von E-Mails und Telefonnummern bis hin zu URLs und Hashes.
{"sdk":"flutter"}{"sdk":"flutter"}^2.0.2{"sdk":"flutter"}^2.0.0Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.
Pub Popularity Pub Points Pub Likes Pub Version Youtube LinkedIn
Visitor Count Extract whatever you need with Extract and save your time
The phoneNumbers method within the Extract class is responsible for extracting phone numbers from the provided text using regular expressions.
Method Signature:
static List<String> phoneNumbers(String text)
Parameters:
text: The text input from which phone numbers will be extracted.Description:
This method utilizes a regular expression pattern to identify and extract phone numbers from the given text. It captures sequences that resemble phone numbers, including various formats like +1234567890, 123-456-7890, etc.
Usage:
String text = 'Contact us at +1234567890 or 123-456-7890';
List<String> numbers = Extract.phoneNumbers(text);
Example:
String text = 'Reach us at +1 555-555-5555 or 123-456-7890';
List<String> extractedNumbers = Extract.phoneNumbers(text);
// Result: ['+1 555-555-5555', '123-456-7890']
Return Value:
Note:
Considerations:
The urls method within the Extract class is designed to extract URLs from the provided text using regular expressions.
Method Signature:
static List<String> urls(String text)
Parameters:
text: The text input from which URLs will be extracted.Description:
This method employs a regular expression pattern (RegExp) to identify and extract URLs from the given text. It captures URL patterns that start with http:// or https:// followed by a sequence of characters representing the URL structure.
Usage:
String text = 'Visit our website at https://example.com';
List<String> extractedUrls = Extract.urls(text);
Example:
String text = 'Explore more at http://www.example.org and https://another-example.com';
List<String> extracted = Extract.urls(text);
// Result: ['http://www.example.org', 'https://another-example.com']
Return Value:
Note:
Considerations:
The allDates method within the Extract class is designed to extract various date formats from the provided text using multiple regular expression patterns.
Method Signature:
List<String> allDates(String text)
Parameters:
text: The text input from which different date formats will be extracted.Description:
This method utilizes an array of regular expression patterns to identify and extract various date formats from the given text. It captures different date representations such as DD/MM/YYYY, Jan 31, 2023, 2023-12-31, etc., covering a wide range of common date formats.
Usage:
String text = 'The event is on 12/31/2023 or Jan 15, 2024';
List<String> extractedDates = Extract.allDates(text);
Example:
String text = 'Meeting scheduled for 31-Dec-2023 or 01.15.2024';
List<String> extracted = Extract.allDates(text);
// Result: ['31-Dec-23', '01.15.2024']
Return Value:
Note:
Considerations:
The specificWords method within the Extract class is designed to extract occurrences of a specific word from the provided text using a case-insensitive regular expression pattern.
Method Signature:
static List<String> specificWords(String text, String word)
Parameters:
text: The text input from which occurrences of the specific word will be extracted.word: The specific word to search for in the text.Description:
This method constructs a case-insensitive regular expression pattern to identify and extract instances of the specified word within the given text.
Usage:
String text = 'The word "apple" appeared multiple times in the text.';
String specificWord = 'apple';
List<String> extractedWords = Extract.specificWords(text, specificWord);
Example:
String text = 'The term "apple" refers to a fruit named apple.';
String specificWord = 'apple';
List<String> extracted = Extract.specificWords(text, specificWord);
// Result: ['apple', 'apple']
Return Value:
word present in the provided text.Note:
word based on word boundaries and ignores case sensitivity.Considerations:
text contains instances of the specific word for accurate extraction.The addresses method within the Extract class aims to extract addresses from the provided text using a regular expression pattern.
Method Signature:
static List<String> addresses(String text)
Parameters:
text: The text input containing addresses to be extracted.Description:
This method employs a regular expression pattern designed to identify and extract addresses from the given text. It looks for patterns resembling standard address formats and retrieves them from the text.
Usage:
String text = 'The address is 123 Main St, City, State 12345';
List<String> extractedAddresses = Extract.addresses(text);
Example:
String text = '1234 Elm Street, Apt 5B, New York, NY 10001';
List<String> extracted = Extract.addresses(text);
// Result: ['1234 Elm Street, Apt 5B, New York, NY 10001']
Return Value:
Note:
Considerations:
text contains addresses conforming to the patterns recognized by the regular expression for accurate extraction.The numericValues method within the Extract class is designed to extract numeric values from the provided text, allowing an option to include decimals based on the specified flag.
Method Signature:
static List<String> numericValues(String text, {bool includeDecimals = false})
Parameters:
text: The text input containing numeric values to be extracted.includeDecimals (Optional): A boolean flag that specifies whether to include decimal values (default: false).Description:
This method utilizes a regular expression pattern to identify and extract numeric values from the given text. The inclusion of decimals is controlled by the includeDecimals parameter.
Usage:
String text = 'The price is $25.99, and the count is 100.';
List<String> extractedNumbers = Extract.numericValues(text);
List<String> extractedDecimals = Extract.numericValues(text, includeDecimals: true);
Example:
String text = 'The product cost is $50.';
List<String> extracted = Extract.numericValues(text);
// Result: ['50']
List<String> extractedWithDecimals = Extract.numericValues(text, includeDecimals: true);
// Result: ['50']
Return Value:
Note:
includeDecimals parameter.Considerations:
text contains numeric values that conform to the expected patterns for accurate extraction.The hashtagsMentions method within the Extract class is designed to extract hashtags and optionally mentions from the provided text.
Method Signature:
static List<String> hashtagsMentions(String text, {bool includeMentions = true})
Parameters:
text: The text input containing hashtags and/or mentions to be extracted.includeMentions (Optional): A boolean flag that specifies whether to include mentions (default: true).Description:
This method utilizes a regular expression pattern to identify and extract hashtags and mentions from the given text. The extraction of mentions is controlled by the includeMentions parameter.
Usage:
String text = 'This is a #hashtag and a @mention in a sentence.';
List<String> extractedTags = Extract.hashtagsMentions(text);
List<String> extractedOnlyHashtags = Extract.hashtagsMentions(text, includeMentions: false);
Example:
String text = 'Post about #technology and mention @ChatGPT.';
List<String> extracted = Extract.hashtagsMentions(text);
// Result: ['#technology', '@ChatGPT']
List<String> extractedOnlyHashtags = Extract.hashtagsMentions(text, includeMentions: false);
// Result: ['#technology']
Return Value:
Note:
#hashtag) and mentions (@username) based on the regular expression pattern and includes them in the extraction accordingly.Considerations:
text contains hashtags and/or mentions conforming to expected patterns for accurate extraction.The filePaths method in the Extract class is designed to extract file paths from the provided text based on a specified separator.
Method Signature:
static List<String> filePaths(String text, {String separator = '/'})
Parameters:
text: The input text containing file paths to be extracted.separator (Optional): A string specifying the separator used in the file paths (default: /).Description:
This method uses a regular expression pattern to identify and extract file paths from the given text based on the provided separator.
Usage:
String text = 'The file paths are /path/to/file1.txt and /directory/path/file2.jpg';
List<String> extractedPaths = Extract.filePaths(text);
List<String> extractedPathsUsingSeparator = Extract.filePaths(text, separator: '/');
Example:
String text = 'The file paths are /path/to/file1.txt and /directory/path/file2.jpg';
List<String> extracted = Extract.filePaths(text);
// Result: ['/path/to/file1.txt', '/directory/path/file2.jpg']
Return Value:
Note:
separator parameter to define the separator character(s) in the file paths. Adjust the separator parameter to match the specific separator used in the input text for accurate extraction.Considerations:
text contains file paths conforming to the expected structure and uses the provided separator for accurate extraction.The specialCharacters method in the Extract class aims to extract special characters from the provided text based on a specified character set.
Method Signature:
static List<String> specialCharacters(String text, {String characterSet = r'[^\w\s]'})
Parameters:
text: The input text containing special characters to be extracted.characterSet (Optional): A string specifying the character set for extracting special characters (default: r'[^\w\s]').Description:
This method utilizes a regular expression pattern to identify and extract special characters from the given text based on the provided characterSet.
Usage:
String text = 'The $@# text! *& contains special characters.';
List<String> extractedChars = Extract.specialCharacters(text);
List<String> extractedCharsWithCustomSet = Extract.specialCharacters(text, characterSet: r'[!@#$%^&*]');
Example:
String text = 'The $@# text! *& contains special characters.';
List<String> extracted = Extract.specialCharacters(text);
// Result: ['$', '@', '#', '!', '*', '&']
Return Value:
characterSet.Note:
characterSet parameter to define the set of characters to be extracted as special characters. Modify the characterSet parameter to match the specific characters you want to extract.Considerations:
text contains the characters that align with the specified characterSet for accurate extraction.The keywordsPhrases method in the Extract class is designed to extract occurrences of a specific keyword or phrase from the provided text.
Method Signature:
static List<String> keywordsPhrases(String text, String keyword, {bool caseSensitive = false})
Parameters:
text: The input text where the method will search for the specified keyword or phrase.keyword: The specific word or phrase to search for in the text.caseSensitive (Optional): A boolean indicating whether the search for keyword should be case-sensitive (default: false).Description:
This method utilizes a regular expression pattern to identify and extract occurrences of the specified keyword or phrase from the given text. The caseSensitive parameter allows toggling between case-sensitive and case-insensitive searches.
Usage:
String text = 'The quick brown fox jumps over the lazy dog.';
String keyword = 'the';
List<String> extracted = Extract.keywordsPhrases(text, keyword);
List<String> caseSensitiveExtracted = Extract.keywordsPhrases(text, keyword, caseSensitive: true);
Example:
String text = 'The quick brown fox jumps over the lazy dog.';
String keyword = 'the';
List<String> extracted = Extract.keywordsPhrases(text, keyword);
// Result (case-insensitive): ['The', 'the']
Return Value:
keyword or phrase in the provided text.Note:
caseSensitive parameter to true.\b) in the regular expression pattern to ensure it matches whole words or phrases.Considerations:
text and keyword parameters are accurately provided to extract the desired occurrences.The sentencesParagraphs method within the Extract class is designed to extract sentences or paragraphs from the given text.
Method Signature:
static List<String> sentencesParagraphs(String text, {String separator = '.'})
Parameters:
text: The text input from which sentences or paragraphs will be extracted.separator (Optional): The separator indicating the end of a sentence or paragraph (default: .).Description:
This method uses a regular expression pattern to split the provided text into sentences or paragraphs based on the specified separator. Each match represents a sentence or paragraph in the text.
Usage:
String text = 'This is a sample text. It contains multiple sentences.';
List<String> extractedSentences = Extract.sentencesParagraphs(text);
List<String> extractedParagraphs = Extract.sentencesParagraphs(text, separator: '\n');
Example:
String text = 'This is a sample text. It contains multiple sentences.';
List<String> extractedSentences = Extract.sentencesParagraphs(text);
// Result: ['This is a sample text', ' It contains multiple sentences']
Return Value:
separator provided.Note:
separator to identify sentences or paragraphs. Custom separators like \n can be used for paragraph extraction.Considerations:
text input is correctly provided for accurate sentence or paragraph extraction.separator parameter to suit the text's structure and the desired splitting criteria.The acronymsAbbreviations method within the Extract class is used to extract acronyms or abbreviations from the provided text.
Method Signature:
static List<String> acronymsAbbreviations(String text)
Parameters:
text: The input text from which acronyms or abbreviations will be extracted.Description:
This method employs a regular expression pattern to identify and extract sequences of uppercase letters (A-Z) with a minimum length of two characters, assuming them to be acronyms or abbreviations.
Usage:
String text = 'The NASA is an acronym for National Aeronautics and Space Administration.';
List<String> extractedAcronyms = Extract.acronymsAbbreviations(text);
Example:
String text = 'The NASA is an acronym for National Aeronautics and Space Administration.';
List<String> extractedAcronyms = Extract.acronymsAbbreviations(text);
// Result: ['NASA']
Return Value:
text.Note:
text accurately represents content where acronyms or abbreviations might exist.Considerations:
The ssns method within the Extract class is designed to extract Social Security Numbers (SSNs) from the provided text.
Method Signature:
static List<String> ssns(String text)
Parameters:
text: The input text from which SSNs will be extracted.Description:
This method uses a regular expression pattern to identify and extract sequences of digits in the format ###-##-####, assuming them to be Social Security Numbers (SSNs).
Usage:
String text = 'The document contains SSNs like 123-45-6789 and 987-65-4321.';
List<String> extractedSSNs = Extract.ssns(text);
Example:
String text = 'The document contains SSNs like 123-45-6789 and 987-65-4321.';
List<String> extractedSSNs = Extract.ssns(text);
// Result: ['123-45-6789', '987-65-4321']
Return Value:
text.Note:
###-##-#### and assumes them to be SSNs.text accurately represents content where SSNs might exist.Considerations:
The iPAddresses method, part of the Extract class, is utilized to extract IP addresses from a given text.
Method Signature:
static List<String> iPAddresses(String text)
Parameters:
text: The text where IP addresses are to be identified and extracted.Description:
This method utilizes a regular expression pattern to identify and extract IP addresses in the format of ###.###.###.###.
Usage:
String text = 'The text includes IPs like 192.168.0.1 and 10.0.0.1.';
List<String> extractedIPs = Extract.iPAddresses(text);
Example:
String text = 'The text includes IPs like 192.168.0.1 and 10.0.0.1.';
List<String> extractedIPs = Extract.iPAddresses(text);
// Result: ['192.168.0.1', '10.0.0.1']
Return Value:
text.Note:
###.###.###.### and assumes them to be IP addresses.text accurately represents content where IP addresses might exist.Considerations:
The creditCardNumbers method, part of the Extract class, is designed to extract potential credit card numbers from a given text.
Method Signature:
static List<String> creditCardNumbers(String text)
Parameters:
text: The text where credit card numbers are to be identified and extracted.Description: This method utilizes a regular expression pattern to identify sequences of digits that potentially represent credit card numbers. The identified sequences are typically between 13 to 16 digits, optionally separated by spaces or dashes.
Usage:
String text = 'The text contains credit card numbers like 4111-1111-1111-1111.';
List<String> extractedCreditCards = Extract.creditCardNumbers(text);
Example:
String text = 'The text contains credit card numbers like 4111-1111-1111-1111.';
List<String> extractedCreditCards = Extract.creditCardNumbers(text);
// Result: ['4111-1111-1111-1111']
Return Value:
text.Note:
Considerations:
The codeSnippets method, within the Extract class, is created to extract code snippets from a given text, optionally filtered by a specific programming language.
Method Signature:
static List<String> codeSnippets(String text, {String language = ''})
Parameters:
text: The text containing code snippets.language (optional): The programming language used in the code snippets (if provided).Description: This method employs a regular expression to identify and extract code blocks enclosed in triple backticks (```), optionally filtered by a specified programming language.
Usage:
String text = 'Here is a Dart code snippet:\n```dart\nvoid main() {\n print("Hello, world!");\n}\n```';
List<String> extractedCode = Extract.codeSnippets(text, language: 'dart');
Example:
String text = 'Here is a Dart code snippet:\n```dart\nvoid main() {\n print("Hello, world!");\n}\n```';
List<String> extractedCode = Extract.codeSnippets(text, language: 'dart');
// Result: ['void main() {\n print("Hello, world!");\n}']
Return Value:
text, optionally filtered by the specified programming language.Note:
```).language is not provided, all code snippets regardless of the language tag will be extracted.Considerations:
The unitsOfMeasurement method, within the Extract class, is designed to identify and extract various units of measurement from a given text.
Method Signature:
static List<String> unitsOfMeasurement(String text)
Parameters:
text: The text containing units of measurement.Description: This method utilizes a regular expression to capture numerical values followed by units of measurement in a text. It aims to identify and extract strings representing measurements, such as "5 kg", "10 meters", "20°C", etc.
Usage:
String text = 'The parcel weighs about 5 kg and is 10 meters long.';
List<String> extractedUnits = Extract.unitsOfMeasurement(text);
Example:
String text = 'The parcel weighs about 5 kg and is 10 meters long.';
List<String> extractedUnits = Extract.unitsOfMeasurement(text);
// Result: ['5 kg', '10 meters']
Return Value:
text.Note:
Considerations:
The productCodesIDs method, part of the Extract class, is designed to identify and extract product codes or IDs from a given text.
Method Signature:
static List<String> productCodesIDs(String text)
Parameters:
text: The text containing product codes or IDs.Description: This method utilizes a regular expression to identify and extract alphanumeric strings that are typically used to represent product codes or identifiers. These codes generally consist of a sequence of uppercase letters and numbers.
Usage:
String text = 'The product code is ABC123XYZ456.';
List<String> extractedCodes = Extract.productCodesIDs(text);
Example:
String text = 'The product code is ABC123XYZ456.';
List<String> extractedCodes = Extract.productCodesIDs(text);
// Result: ['ABC123XYZ456']
Return Value:
text.Note:
Considerations:
The sentimentKeywords method, part of the Extract class, identifies specific sentiment-related keywords from a given text.
Method Signature:
static List<String> sentimentKeywords(String text)
Parameters:
text: The text to be analyzed for sentiment-related keywords.Description: This method utilizes a regular expression to extract sentiment-associated words from the input text. It identifies words such as "good," "bad," "excellent," "poor," and "great," regardless of case sensitivity.
Usage:
String text = 'The product was excellent, but the service was poor.';
List<String> extractedSentiments = Extract.sentimentKeywords(text);
Example:
String text = 'The product was excellent, but the service was poor.';
List<String> extractedSentiments = Extract.sentimentKeywords(text);
// Result: ['excellent', 'poor']
Return Value:
text.Note:
Considerations:
The time method, part of the Extract class, extracts time-related patterns from the provided text.
Method Signature:
static List<String> time(String text)
Parameters:
text: The text to be scanned for time-related patterns.Description: This method uses a regular expression to identify time patterns in the input text. It captures time in 24-hour format (HH:MM) and optionally includes seconds (HH:MM:SS) within word boundaries.
Usage:
String text = 'The meeting is scheduled at 14:30. Please arrive on time.';
List<String> extractedTimes = Extract.time(text);
Example:
String text = 'The meeting is scheduled at 14:30. Please arrive on time.';
List<String> extractedTimes = Extract.time(text);
// Result: ['14:30']
Return Value:
text.Note:
Considerations:
The companyNames method, a part of the class or utility, aims to extract potential company names from the provided text.
Method Signature:
static List<String> companyNames(String text)
Parameters:
text: The text in which potential company names are to be identified.Description: This method employs a regular expression to identify sequences of words that potentially represent company names. It captures sequences that start with an uppercase letter, followed by one or more lowercase words, allowing spaces between words.
Usage:
String text = 'The meeting is with Acme Corporation and XYZ Enterprises.';
List<String> extractedCompanies = theClass.companyNames(text);
Example:
String text = 'The meeting is with Acme Corporation and XYZ Enterprises.';
List<String> extractedCompanies = theClass.companyNames(text);
// Result: ['Acme Corporation', 'XYZ Enterprises']
Return Value:
text.Note:
Considerations:
The jobTitles method, part of the class or utility, is designed to extract potential job titles from the provided text.
Method Signature:
static List<String> jobTitles(String text)
Parameters:
text: The text in which potential job titles are to be identified.Description: This method utilizes a regular expression to identify sequences of words that potentially represent job titles. It captures sequences that start with an uppercase letter, followed by one or more lowercase words, allowing spaces between words.
Usage:
String text = 'The team consists of a Software Engineer, Project Manager, and Designer.';
List<String> extractedJobTitles = theClass.jobTitles(text);
Example:
String text = 'The team consists of a Software Engineer, Project Manager, and Designer.';
List<String> extractedJobTitles = theClass.jobTitles(text);
// Result: ['Software Engineer', 'Project Manager', 'Designer']
Return Value:
text.Note:
Considerations:
The vins method, part of the class or utility, is intended to extract Vehicle Identification Numbers (VINs) from the provided text.
Method Signature:
static List<String> vins(String text)
Parameters:
text: The text in which potential Vehicle Identification Numbers (VINs) are to be identified.Description: This method employs a regular expression to identify sequences of characters that adhere to the typical structure of a VIN. It captures sequences comprising 17 characters, excluding I, O, and Q, as per standard VIN patterns.
Usage:
String text = 'The VINs for the cars are ABCDEFG123456789 and XYZ9876543210HJK.';
List<String> extractedVINs = theClass.vins(text);
Example:
String text = 'The VINs for the cars are ABCDEFG123456789 and XYZ9876543210HJK.';
List<String> extractedVINs = theClass.vins(text);
// Result: ['ABCDEFG123456789', 'XYZ9876543210HJK']
Return Value:
text.Note:
Considerations:
The twitterHandles method, a part of the class or utility, aims to extract potential Twitter handles from the provided text.
Method Signature:
static List<String> twitterHandles(String text)
Parameters:
text: The text in which potential Twitter handles are to be identified.Description: This method utilizes a regular expression to identify sequences that match the typical structure of Twitter handles. It captures sequences starting with '@' followed by alphanumeric characters or underscores.
Usage:
String text = 'Contact us via @example_handle or follow @the_twitter!';
List<String> extractedHandles = theClass.twitterHandles(text);
Example:
String text = 'Contact us via @example_handle or follow @the_twitter!';
List<String> extractedHandles = theClass.twitterHandles(text);
// Result: ['@example_handle', '@the_twitter']
Return Value:
text.Note:
Considerations:
The youTubeVideoIDs method, a part of the class or utility, is aimed at extracting potential YouTube video IDs from the provided text.
Method Signature:
static List<String> youTubeVideoIDs(String text)
Parameters:
text: The text in which potential YouTube video IDs are to be identified.Description: This method utilizes a regular expression to identify sequences that match the typical structure of YouTube video IDs. It captures sequences following the patterns found in standard YouTube video URLs.
Usage:
String text = 'Check out this video: https://youtu.be/abcdefghijk';
List<String> extractedVideoIDs = theClass.youTubeVideoIDs(text);
Example:
String text = 'Check out this video: https://youtu.be/abcdefghijk';
List<String> extractedVideoIDs = theClass.youTubeVideoIDs(text);
// Result: ['abcdefghijk']
Return Value:
text.Note:
Considerations:
The isbns method, part of the class or utility, is intended to extract potential International Standard Book Numbers (ISBNs) from the provided text.
Method Signature:
static List<String> isbns(String text)
Parameters:
text: The text in which potential ISBNs are to be identified.Description: This method utilizes a complex regular expression to identify sequences that adhere to the typical structure of ISBNs. It captures sequences following various ISBN formats, including 10-digit and 13-digit ISBNs, with or without hyphens.
Usage:
String text = 'The ISBNs in the text are ISBN-13: 978-1-56619-909-4 and ISBN-10: 0-306-40615-2';
List<String> extractedISBNs = theClass.isbns(text);
Example:
String text = 'The ISBNs in the text are ISBN-13: 978-1-56619-909-4 and ISBN-10: 0-306-40615-2';
List<String> extractedISBNs = theClass.isbns(text);
// Result: ['978-1-56619-909-4', '0-306-40615-2']
Return Value:
text.Note:
Considerations:
The htmlTagsAttributes method, part of the class or utility, aims to extract HTML tags with their attributes and content from the provided text.
Method Signature:
static List<String> htmlTagsAttributes(String text)
Parameters:
text: The text in which HTML tags with attributes and content are to be identified.Description: This method utilizes a regular expression to identify HTML tags along with their attributes and content. It captures sequences that resemble valid HTML tags encompassing attributes and enclosed content.
Usage:
String text = '<p class="example">This is a paragraph.</p><div><span>Hello</span></div>';
List<String> extractedHTML = theClass.htmlTagsAttributes(text);
Example:
String text = '<p class="example">This is a paragraph.</p><div><span>Hello</span></div>';
List<String> extractedHTML = theClass.htmlTagsAttributes(text);
// Result: ['<p class="example">This is a paragraph.</p>', '<div><span>Hello</span></div>']
Return Value:
text.Note:
Considerations:
The hexColorCodes method, part of the class or utility, is intended to extract hexadecimal color codes from the provided text.
Method Signature:
static List<String> hexColorCodes(String text)
Parameters:
text: The text in which potential hexadecimal color codes are to be identified.Description: This method utilizes a regular expression to identify sequences that match the typical structure of hexadecimal color codes. It captures sequences starting with '#' followed by six characters representing hexadecimal digits (0-9, A-F, or a-f).
Usage:
String text = 'The colors used are #FF0000 (red) and #00FF00 (green).';
List<String> extractedColors = theClass.hexColorCodes(text);
Example:
String text = 'The colors used are #FF0000 (red) and #00FF00 (green).';
List<String> extractedColors = theClass.hexColorCodes(text);
// Result: ['#FF0000', '#00FF00']
Return Value:
text.Note:
Considerations:
The statisticalData method, part of the class or utility, aims to identify statistical terms within the provided text.
Method Signature:
static List<String> statisticalData(String text)
Parameters:
text: The text in which statistical terms are to be identified.Description: This method employs a regular expression to identify specific statistical terms such as 'mean', 'median', 'mode', or 'range' within the text.
Usage:
String text = 'The mean and median values were calculated for the dataset.';
List<String> extractedStats = theClass.statisticalData(text);
Example:
String text = 'The mean and median values were calculated for the dataset.';
List<String> extractedStats = theClass.statisticalData(text);
// Result: ['mean', 'median']
Return Value:
text.Note:
Considerations:
The twiiterAndFacebookPostIDs method, a part of the class or utility, is intended to extract post IDs from either Twitter or Facebook URLs based on the provided platform.
Method Signature:
static List<String> twiiterAndFacebookPostIDs(String text, String platform)
Parameters:
text: The text in which post IDs are to be identified.platform: A string specifying the platform ('Twitter' or 'Facebook') for extraction.Description: This method uses a regular expression to extract post IDs from either Twitter or Facebook URLs based on the specified platform.
Usage:
String text = 'Check out this post: https://twitter.com/user/status/1234567890';
List<String> extractedIDs = theClass.twiiterAndFacebookPostIDs(text, 'Twitter');
Example:
String text = 'Check out this post: https://twitter.com/user/status/1234567890';
List<String> extractedIDs = theClass.twiiterAndFacebookPostIDs(text, 'Twitter');
// Result: ['1234567890']
Return Value:
Note:
platform parameter and extracts the corresponding post IDs using distinct regular expression patterns for each platform.Considerations:
The employeeIDs method, a part of the class or utility, is designed to extract potential employee identification codes from the provided text.
Method Signature:
static List<String> employeeIDs(String text)
Parameters:
text: The text in which potential employee IDs are to be identified.Description: This method utilizes a regular expression to identify sequences that match the pattern of employee identification codes. It captures sequences comprising alphanumeric characters, typically five or more characters long.
Usage:
String text = 'The employee IDs are E12345, A987654, and X56789.';
List<String> extractedIDs = theClass.employeeIDs(text);
Example:
String text = 'The employee IDs are E12345, A987654, and X56789.';
List<String> extractedIDs = theClass.employeeIDs(text);
// Result: ['E12345', 'A987654', 'X56789']
Return Value:
text.Note:
Considerations:
The bankAccountNumbers method, a part of the class or utility, aims to extract potential bank account numbers from the provided text.
Method Signature:
static List<String> bankAccountNumbers(String text)
Parameters:
text: The text in which potential bank account numbers are to be identified.Description: This method utilizes a regular expression to identify sequences that match the pattern of bank account numbers. It captures sequences comprising 9 to 12 digits, representing potential bank account numbers.
Usage:
String text = 'Please verify account numbers: 123456789 and 9876543210.';
List<String> extractedAccountNumbers = theClass.bankAccountNumbers(text);
Example:
String text = 'Please verify account numbers: 123456789 and 9876543210.';
List<String> extractedAccountNumbers = theClass.bankAccountNumbers(text);
// Result: ['123456789', '9876543210']
Return Value:
text.Note:
Considerations:
The apiEndpoints method, part of the class or utility, aims to extract potential API endpoints from the provided text.
Method Signature:
static List<String> apiEndpoints(String text)
Parameters:
text: The text in which potential API endpoints are to be identified.Description: This method utilizes a regular expression to identify sequences that match the structure of API endpoints. It captures sequences starting with '/' followed by alphanumeric characters, hyphens, and underscores.
Usage:
String text = 'The API endpoints are /users/get and /posts/all.';
List<String> extractedEndpoints = theClass.apiEndpoints(text);
Example:
String text = 'The API endpoints are /users/get and /posts/all.';
List<String> extractedEndpoints = theClass.apiEndpoints(text);
// Result: ['/users/get', '/posts/all']
Return Value:
text.Note:
Considerations:
The osPaths method, part of the class or utility, is intended to extract potential operating system paths from the provided text.
Method Signature:
static List<String> osPaths(String text)
Parameters:
text: The text in which potential OS paths are to be identified.Description: This method utilizes a regular expression to identify sequences resembling operating system paths. It captures sequences following the structure of a drive letter (e.g., C:) followed by a series of folders or files separated by backslashes.
Usage:
String text = 'The file paths are C:\\Users\\User\\Documents\\file.txt and D:\\Folder\\image.jpg.';
List<String> extractedPaths = theClass.osPaths(text);
Example:
String text = 'The file paths are C:\\Users\\User\\Documents\\file.txt and D:\\Folder\\image.jpg.';
List<String> extractedPaths = theClass.osPaths(text);
// Result: ['C:\\Users\\User\\Documents\\file.txt', 'D:\\Folder\\image.jpg']
Return Value:
text.Note:
Considerations:
The twitterAndFacebookPostContent method, part of the class or utility, is intended to extract content related to Twitter or Facebook posts based on the provided platform.
Method Signature:
static List<String> twitterAndFacebookPostContent(String text, String platform)
Parameters:
text: The text in which post content is to be identified.platform: A string specifying the platform ('Twitter' or 'Facebook') for extraction.Description: This method uses a regular expression to extract post IDs from either Twitter or Facebook URLs based on the specified platform.
Usage:
String text = 'Check out this post: https://twitter.com/user/status/1234567890';
List<String> extractedContent = theClass.twitterAndFacebookPostContent(text, 'Twitter');
Example:
String text = 'Check out this post: https://twitter.com/user/status/1234567890';
List<String> extractedContent = theClass.twitterAndFacebookPostContent(text, 'Twitter');
// Result: ['1234567890']
Return Value:
Note:
platform parameter and extracts the corresponding post IDs using distinct regular expression patterns for each platform.Considerations:
The softwareVersionNumbers method, part of the class or utility, aims to extract potential software version numbers from the provided text.
Method Signature:
static List<String> softwareVersionNumbers(String text)
Parameters:
text: The text in which potential software version numbers are to be identified.Description: This method utilizes a regular expression to identify sequences that match the structure of software version numbers. It captures sequences consisting of digits separated by periods.
Usage:
String text = 'The software versions are 1.0, 2.3.4, and 5.6.7.8.';
List<String> extractedVersions = theClass.softwareVersionNumbers(text);
Example:
String text = 'The software versions are 1.0, 2.3.4, and 5.6.7.8.';
List<String> extractedVersions = theClass.softwareVersionNumbers(text);
// Result: ['1.0', '2.3.4', '5.6.7.8']
Return Value:
text.Note:
Considerations:
The ordinalNumbers method, part of the class or utility, is aimed at extracting ordinal numbers from the provided text.
Method Signature:
static List<String> ordinalNumbers(String text)
Parameters:
text: The text in which ordinal numbers are to be identified.Description: This method employs a regular expression to identify sequences that match the structure of ordinal numbers (e.g., first, second, third). It captures words representing ordinal positions in a case-insensitive manner.
Usage:
String text = 'The first, second, and third positions are important.';
List<String> extractedOrdinals = theClass.ordinalNumbers(text);
Example:
String text = 'The first, second, and third positions are important.';
List<String> extractedOrdinals = theClass.ordinalNumbers(text);
// Result: ['first', 'second', 'third']
Return Value:
text.Note:
Considerations:
The metaTags method, part of the class or utility, is designed to extract HTML meta tags from the provided text.
Method Signature:
static List<String> metaTags(String text)
Parameters:
text: The text in which HTML meta tags are to be identified.Description: This method utilizes a regular expression to identify HTML meta tags within the text. It captures sequences resembling standard HTML meta tags.
Usage:
String text = '<meta charset="UTF-8"><meta name="description" content="Sample description">';
List<String> extractedMetaTags = theClass.metaTags(text);
Example:
String text = '<meta charset="UTF-8"><meta name="description" content="Sample description">';
List<String> extractedMetaTags = theClass.metaTags(text);
// Result: ['<meta charset="UTF-8">', '<meta name="description" content="Sample description">']
Return Value:
text.Note:
Considerations:
The stockTickerSymbols method, part of the class or utility, aims to extract potential stock ticker symbols from the provided text.
Method Signature:
static List<String> stockTickerSymbols(String text)
Parameters:
text: The text in which potential stock ticker symbols are to be identified.Description: This method utilizes a regular expression to identify sequences that match the structure of stock ticker symbols. It captures sequences comprising 2 to 5 uppercase letters typically representing stock ticker symbols.
Usage:
String text = 'The stock symbols mentioned are AAPL, GOOGL, and TSLA.';
List<String> extractedSymbols = theClass.stockTickerSymbols(text);
Example:
String text = 'The stock symbols mentioned are AAPL, GOOGL, and TSLA.';
List<String> extractedSymbols = theClass.stockTickerSymbols(text);
// Result: ['AAPL', 'GOOGL', 'TSLA']
Return Value:
text.Note:
Considerations:
The hashValues method, part of the class or utility, aims to extract potential hash values from the provided text.
Method Signature:
static List<String> hashValues(String text)
Parameters:
text: The text in which potential hash values are to be identified.Description: This method utilizes a regular expression to identify sequences resembling hash values. It captures sequences comprising 32, 40, or 64 characters of hexadecimal digits (0-9, A-F, or a-f).
Usage:
String text = 'The hash values found are A1B2C3... and 123abc...';
List<String> extractedHashes = theClass.hashValues(text);
Example:
String text = 'The hash values found are A1B2C3... and 123abc...';
List<String> extractedHashes = theClass.hashValues(text);
// Result: ['A1B2C3...', '123abc...']
Return Value:
text.Note:
Considerations:
The chemicalCompoundNames method, part of the class or utility, is designed to extract potential chemical compound names from the provided text.
Method Signature:
static List<String> chemicalCompoundNames(String text)
Parameters:
text: The text in which potential chemical compound names are to be identified.Description: This method employs a regular expression to identify sequences that match the structure of chemical compound names. It captures words typically starting with an uppercase letter followed by lowercase letters.
Usage:
String text = 'The chemical compounds include Water, Oxygen, and Hydrochloric acid.';
List<String> extractedCompounds = theClass.chemicalCompoundNames(text);
Example:
String text = 'The chemical compounds include Water, Oxygen, and Hydrochloric acid.';
List<String> extractedCompounds = theClass.chemicalCompoundNames(text);
// Result: ['Water', 'Oxygen', 'Hydrochloric']
Return Value:
text.Note:
Considerations:
The mimeTypes method, part of the class or utility, aims to extract potential MIME types from the provided text.
Method Signature:
static List<String> mimeTypes(String text)
Parameters:
text: The text in which potential MIME types are to be identified.Description: This method utilizes a regular expression to identify sequences resembling MIME types. It captures sequences consisting of letters, hyphens, and slashes in a specific format.
Usage:
String text = 'The MIME types detected are text/plain, image/jpeg, and application/json.';
List<String> extractedMIMEs = theClass.mimeTypes(text);
Example:
String text = 'The MIME types detected are text/plain, image/jpeg, and application/json.';
List<String> extractedMIMEs = theClass.mimeTypes(text);
// Result: ['text/plain', 'image/jpeg', 'application/json']
Return Value:
text.Note:
Considerations:
The httpStatusCodes method, part of the class or utility, aims to extract potential HTTP status codes from the provided text.
Method Signature:
static List<String> httpStatusCodes(String text)
Parameters:
text: The text in which potential HTTP status codes are to be identified.Description: This method employs a regular expression to identify sequences that match the structure of HTTP status codes. It captures three consecutive digits representing HTTP status codes.
Usage:
String text = 'The HTTP status codes returned were 200, 404, and 500.';
List<String> extractedCodes = theClass.httpStatusCodes(text);
Example:
String text = 'The HTTP status codes returned were 200, 404, and 500.';
List<String> extractedCodes = theClass.httpStatusCodes(text);
// Result: ['200', '404', '500']
Return Value:
text.Note:
Considerations:
The coordinates method, part of the class or utility, is intended to extract potential geographical coordinates from the provided text.
Method Signature:
static List<String> coordinates(String text)
Parameters:
text: The text in which potential coordinates are to be identified.Description: This method utilizes a regular expression to identify sequences resembling geographical coordinates. It captures numeric values potentially representing latitude and longitude coordinates with various formats.
Usage:
String text = 'The coordinates found were 40.7128° N, 74.0060° W and -33.8688° S, 151.2093° E.';
List<String> extractedCoords = theClass.coordinates(text);
Example:
String text = 'The coordinates found were 40.7128° N, 74.0060° W and -33.8688° S, 151.2093° E.';
List<String> extractedCoords = theClass.coordinates(text);
// Result: ['40.7128° N', '74.0060° W', '-33.8688° S', '151.2093° E']
Return Value:
text.Note:
Considerations:
The extractProgrammingKeywords method, part of the class or utility, is designed to extract programming keywords from the provided text based on a specified programming language.
Method Signature:
static List<String> extractProgrammingKeywords(String text, String language)
Parameters:
text: The text in which programming keywords are to be identified.language: A string specifying the programming language ('Dart' or other) for keyword extraction.Description: This method utilizes a regular expression to identify sequences that match the provided programming language's keywords. It captures words representing programming language keywords in a case-insensitive manner.
Usage:
String text = 'The code snippet contains keywords like abstract, dynamic, and if.';
List<String> extractedKeywords = theClass.extractProgrammingKeywords(text, 'Dart');
Example:
String text = 'The code snippet contains keywords like abstract, dynamic, and if.';
List<String> extractedKeywords = theClass.extractProgrammingKeywords(text, 'Dart');
// Result: ['abstract', 'dynamic', 'if']
Return Value:
text based on the specified programming language.Note:
language parameter and extracts corresponding keywords using a pre-defined list of keywords for each language.Considerations:
keywordList variable to include the complete list of keywords specific to each supported programming language.