From Bohemia Interactive Community
Jump to navigation
Jump to search
Hover & click on the images for description
Description
- Description:
- Searches in a string with a regular expression.
- Groups:
- Strings - Regular Expression
Syntax
- Syntax:
- haystack regexFind [pattern, startOffset]
- Parameters:
- haystack: String
- pattern: String - format regex pattern
- offset: Number - (Optional, default: 0) has to be in range from 0 to count haystack (haystack's length)
- Return Value:
- Array of nested arrays. Each lowest level array in format:
- 0: String - match
- 1: Number - offset of given match relative to haystack beginning (the provided offset is ignored)
Examples
- Example 1:
- Example 2:
- Example 3:
- Example 4:
- Multiline example:
- Example 5:
- Example 6:
Additional Information
- See also:
- regexMatch regexReplace
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here!
Add Note