Regular Expressions 101

Save & Manage Regex

  • Current Version: 3
  • Save & Share
  • Community Library

Flavor

  • PCRE2 (PHP)
  • ECMAScript (JavaScript)
  • Python
  • Golang
  • Java
  • .NET 7.0 (C#)
  • Rust
  • PCRE (Legacy)
  • Regex Flavor Guide

Function

  • Match
  • Substitution
  • List
  • Unit Tests
Sponsors
There are currently no sponsors. Become a sponsor today!
An explanation of your regex will be automatically generated as you type.
Detailed match information will be displayed here automatically.
  • All Tokens
  • Common Tokens
  • General Tokens
  • Anchors
  • Meta Sequences
  • Quantifiers
  • Group Constructs
  • Character Classes
  • Flags/Modifiers
  • Substitution
  • A single character of: a, b or c
    [abc]
  • A character except: a, b or c
    [^abc]
  • A character in the range: a-z
    [a-z]
  • A character not in the range: a-z
    [^a-z]
  • A character in the range: a-z or A-Z
    [a-zA-Z]
  • Any single character
    .
  • Alternate - match either a or b
    a|b
  • Any whitespace character
    \s
  • Any non-whitespace character
    \S
  • Any digit
    \d
  • Any non-digit
    \D
  • Any word character
    \w
  • Any non-word character
    \W
  • Non-capturing group
    (?:...)
  • Capturing group
    (...)
  • Zero or one of a
    a?
  • Zero or more of a
    a*
  • One or more of a
    a+
  • Exactly 3 of a
    a{3}
  • 3 or more of a
    a{3,}
  • Between 3 and 6 of a
    a{3,6}
  • Start of string
    ^
  • End of string
    $
  • A word boundary
    \b
  • Non-word boundary
    \B

Regular Expression
Processing...

Test String

Code Generator

Generated Code

#include <StringConstants.au3> ; to declare the Constants of StringRegExp #include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate Local $sRegex = "(?s)menuentry\s+"?[[:alnum:] ]+"?\s+{\n([[:print:]\t]+(?<!disabled)\n)+}" Local $sString = "#" & @CRLF & _ "# refind.conf" & @CRLF & _ "# Configuration file for the rEFInd boot menu" & @CRLF & _ "#" & @CRLF & _ "" & @CRLF & _ "# Timeout in seconds for the main menu screen. Setting the timeout to 0" & @CRLF & _ "# disables automatic booting (i.e., no timeout). Setting it to -1 causes" & @CRLF & _ "# an immediate boot to the default OS *UNLESS* a keypress is in the buffer" & @CRLF & _ "# when rEFInd launches, in which case that keypress is interpreted as a" & @CRLF & _ "# shortcut key. If no matching shortcut is found, rEFInd displays its" & @CRLF & _ "# menu with no timeout." & @CRLF & _ "#" & @CRLF & _ "timeout 2" & @CRLF & _ "" & @CRLF & _ "# Set the logging level. When set to 0, rEFInd does not log its actions." & @CRLF & _ "# When set to 1 or above, rEFInd creates a file called refind.log in" & @CRLF & _ "# its home directory on the ESP and records information about what it's" & @CRLF & _ "# doing. Higher values record more information, up to a maximum of 4." & @CRLF & _ "# This token should be left at the default of 0 except when debugging" & @CRLF & _ "# problems." & @CRLF & _ "# Default value is 0" & @CRLF & _ "#" & @CRLF & _ "#log_level 1" & @CRLF & _ "" & @CRLF & _ "# Normally, when the timeout period has passed, rEFInd boots the" & @CRLF & _ "# default_selection. If the following option is uncommented, though," & @CRLF & _ "# rEFInd will instead attempt to shut down the computer." & @CRLF & _ "# CAUTION: MANY COMPUTERS WILL INSTEAD HANG OR REBOOT! Macs and more" & @CRLF & _ "# recent UEFI-based PCs are most likely to work with this feature." & @CRLF & _ "# Default value is true" & @CRLF & _ "#" & @CRLF & _ "#shutdown_after_timeout" & @CRLF & _ "" & @CRLF & _ "# Whether to store rEFInd's rEFInd-specific variables in NVRAM (1, true," & @CRLF & _ "# or on) or in files in the "vars" subdirectory of rEFInd's directory on" & @CRLF & _ "# disk (0, false, or off). Using NVRAM works well with most computers;" & @CRLF & _ "# however, it increases wear on the motherboard's NVRAM, and if the EFI" & @CRLF & _ "# is buggy or the NVRAM is old and worn out, it may not work at all." & @CRLF & _ "# Storing variables on disk is a viable alternative in such cases, or" & @CRLF & _ "# if you want to minimize wear and tear on the NVRAM; however, it won't" & @CRLF & _ "# work if rEFInd is stored on a filesystem that's read-only to the EFI" & @CRLF & _ "# (such as an HFS+ volume), and it increases the risk of filesystem" & @CRLF & _ "# damage. Note that this option affects ONLY rEFInd's own variables," & @CRLF & _ "# such as the PreviousBoot, HiddenTags, HiddenTools, and HiddenLegacy" & @CRLF & _ "# variables. It does NOT affect Secure Boot or other non-rEFInd" & @CRLF & _ "# variables." & @CRLF & _ "# Default is true" & @CRLF & _ "#" & @CRLF & _ "use_nvram false" & @CRLF & _ "" & @CRLF & _ "# Screen saver timeout; the screen blanks after the specified number of" & @CRLF & _ "# seconds with no keyboard input. The screen returns after most keypresses" & @CRLF & _ "# (unfortunately, not including modifier keys such as Shift, Control, Alt," & @CRLF & _ "# or Option). Setting a value of "-1" causes rEFInd to start up with its" & @CRLF & _ "# screen saver active. The default is 0, which disables the screen saver." & @CRLF & _ "#" & @CRLF & _ "#screensaver 300" & @CRLF & _ "" & @CRLF & _ "# Hide user interface elements for personal preference or to increase" & @CRLF & _ "# security:" & @CRLF & _ "# banner - the rEFInd title banner (built-in or loaded via "banner")" & @CRLF & _ "# label - boot option text label in the menu" & @CRLF & _ "# singleuser - remove the submenu options to boot macOS in single-user" & @CRLF & _ "# or verbose modes; affects ONLY macOS" & @CRLF & _ "# safemode - remove the submenu option to boot macOS in "safe mode"" & @CRLF & _ "# hwtest - the submenu option to run Apple's hardware test" & @CRLF & _ "# arrows - scroll arrows on the OS selection tag line" & @CRLF & _ "# hints - brief command summary in the menu" & @CRLF & _ "# editor - the options editor (+, F2, or Insert on boot options menu)" & @CRLF & _ "# badges - device-type badges for boot options" & @CRLF & _ "# all - all of the above" & @CRLF & _ "# Default is none of these (all elements active)" & @CRLF & _ "#" & @CRLF & _ "#hideui singleuser" & @CRLF & _ "#hideui all" & @CRLF & _ "" & @CRLF & _ "# Set the name of a subdirectory in which icons are stored. Icons must" & @CRLF & _ "# have the same names they have in the standard directory. The directory" & @CRLF & _ "# name is specified relative to the main rEFInd binary's directory. If" & @CRLF & _ "# an icon can't be found in the specified directory, an attempt is made" & @CRLF & _ "# to load it from the default directory; thus, you can replace just some" & @CRLF & _ "# icons in your own directory and rely on the default for others." & @CRLF & _ "# Icon files may be in any supported format -- ICNS (*.icns), BMP (*.bmp)," & @CRLF & _ "# PNG (*.png), or JPEG (*.jpg or *.jpeg); however, rEFInd's BMP and JPEG" & @CRLF & _ "# implementations do not support transparency, which is highly desirable" & @CRLF & _ "# in icons." & @CRLF & _ "# Default is "icons"." & @CRLF & _ "#" & @CRLF & _ "#icons_dir myicons" & @CRLF & _ "#icons_dir icons/snowy" & @CRLF & _ "" & @CRLF & _ "# Use a custom title banner instead of the rEFInd icon and name. The file" & @CRLF & _ "# path is relative to the directory where refind.efi is located. The color" & @CRLF & _ "# in the top left corner of the image is used as the background color" & @CRLF & _ "# for the menu screens. Currently uncompressed BMP images with color" & @CRLF & _ "# depths of 24, 8, 4 or 1 bits are supported, as well as PNG and JPEG" & @CRLF & _ "# images. (ICNS images can also be used, but ICNS has limitations that" & @CRLF & _ "# make it a poor choice for this purpose.) PNG and JPEG support is" & @CRLF & _ "# limited by the underlying libraries; some files, like progressive JPEGs," & @CRLF & _ "# will not work." & @CRLF & _ "#" & @CRLF & _ "#banner hostname.bmp" & @CRLF & _ "#banner mybanner.jpg" & @CRLF & _ "#banner icons/snowy/banner-snowy.png" & @CRLF & _ "" & @CRLF & _ "# Specify how to handle banners that aren't exactly the same as the screen" & @CRLF & _ "# size:" & @CRLF & _ "# noscale - Crop if too big, show with border if too small" & @CRLF & _ "# fillscreen - Fill the screen" & @CRLF & _ "# Default is noscale" & @CRLF & _ "#" & @CRLF & _ "#banner_scale fillscreen" & @CRLF & _ "" & @CRLF & _ "# Icon sizes. All icons are square, so just one value is specified. The" & @CRLF & _ "# big icons are used for OS selectors in the first row and the small" & @CRLF & _ "# icons are used for tools on the second row. Drive-type badges are 1/4" & @CRLF & _ "# the size of the big icons. Legal values are 32 and above. If the icon" & @CRLF & _ "# files do not hold icons of the proper size, the icons are scaled to" & @CRLF & _ "# the specified size. The default values are 48 and 128 for small and" & @CRLF & _ "# big icons, respectively." & @CRLF & _ "#" & @CRLF & _ "#small_icon_size 96" & @CRLF & _ "#big_icon_size 256" & @CRLF & _ "" & @CRLF & _ "# Custom images for the selection background. There is a big one (144 x 144)" & @CRLF & _ "# for the OS icons, and a small one (64 x 64) for the function icons in the" & @CRLF & _ "# second row. If only a small image is given, that one is also used for" & @CRLF & _ "# the big icons by stretching it in the middle. If only a big one is given," & @CRLF & _ "# the built-in default will be used for the small icons. If an image other" & @CRLF & _ "# than the optimal size is specified, it will be scaled in a way that may" & @CRLF & _ "# be ugly." & @CRLF & _ "#" & @CRLF & _ "# Like the banner option above, these options take a filename of an" & @CRLF & _ "# uncompressed BMP, PNG, JPEG, or ICNS image file with a color depth of" & @CRLF & _ "# 24, 8, 4, or 1 bits. The PNG or ICNS format is required if you need" & @CRLF & _ "# transparency support (to let you "see through" to a full-screen banner)." & @CRLF & _ "#" & @CRLF & _ "#selection_big selection-big.bmp" & @CRLF & _ "#selection_small selection-small.bmp" & @CRLF & _ "" & @CRLF & _ "# Set the font to be used for all textual displays in graphics mode." & @CRLF & _ "# For best results, the font must be a PNG file with alpha channel" & @CRLF & _ "# transparency. It must contain ASCII characters 32-126 (space through" & @CRLF & _ "# tilde), inclusive, plus a glyph to be displayed in place of characters" & @CRLF & _ "# outside of this range, for a total of 96 glyphs. Only monospaced fonts" & @CRLF & _ "# are supported. Fonts may be of any size, although large fonts can" & @CRLF & _ "# produce display irregularities." & @CRLF & _ "# The default is rEFInd's built-in font, Luxi Mono Regular 12 point." & @CRLF & _ "#" & @CRLF & _ "#font myfont.png" & @CRLF & _ "" & @CRLF & _ "# Use text mode only. When enabled, this option forces rEFInd into text mode." & @CRLF & _ "# Passing this option a "0" value causes graphics mode to be used. Pasing" & @CRLF & _ "# it no value or any non-0 value causes text mode to be used." & @CRLF & _ "# Default is to use graphics mode." & @CRLF & _ "#" & @CRLF & _ "#textonly" & @CRLF & _ "" & @CRLF & _ "# Set the EFI text mode to be used for textual displays. This option" & @CRLF & _ "# takes a single digit that refers to a mode number. Mode 0 is normally" & @CRLF & _ "# 80x25, 1 is sometimes 80x50, and higher numbers are system-specific" & @CRLF & _ "# modes. Mode 1024 is a special code that tells rEFInd to not set the" & @CRLF & _ "# text mode; it uses whatever was in use when the program was launched." & @CRLF & _ "# If you specify an invalid mode, rEFInd pauses during boot to inform" & @CRLF & _ "# you of valid modes." & @CRLF & _ "# CAUTION: On VirtualBox, and perhaps on some real computers, specifying" & @CRLF & _ "# a text mode and uncommenting the "textonly" option while NOT specifying" & @CRLF & _ "# a resolution can result in an unusable display in the booted OS." & @CRLF & _ "# Default is 1024 (no change)" & @CRLF & _ "#" & @CRLF & _ "#textmode 2" & @CRLF & _ "" & @CRLF & _ "# Set the screen's video resolution. Pass this option one of the following:" & @CRLF & _ "# * two integer values, corresponding to the X and Y resolutions" & @CRLF & _ "# * one integer value, corresponding to a GOP (UEFI) video mode" & @CRLF & _ "# * the string "max", which sets the maximum available resolution" & @CRLF & _ "# Note that not all resolutions are supported. On UEFI systems, passing" & @CRLF & _ "# an incorrect value results in a message being shown on the screen to" & @CRLF & _ "# that effect, along with a list of supported modes. On EFI 1.x systems" & @CRLF & _ "# (e.g., Macintoshes), setting an incorrect mode silently fails. On both" & @CRLF & _ "# types of systems, setting an incorrect resolution results in the default" & @CRLF & _ "# resolution being used. A resolution of 1024x768 usually works, but higher" & @CRLF & _ "# values often don't." & @CRLF & _ "# Default is "0 0" (use the system default resolution, usually 800x600)." & @CRLF & _ "# Other resolutions: 1920x1080 1680x1050 1440x900 1366x768 1024x600" & @CRLF & _ "#" & @CRLF & _ "resolution max" & @CRLF & _ "" & @CRLF & _ "# Enable touch screen support. If active, this feature enables use of" & @CRLF & _ "# touch screen controls (as on tablets). Note, however, that not all" & @CRLF & _ "# tablets' EFIs provide the necessary underlying support, so this" & @CRLF & _ "# feature may not work for you. If it does work, you should be able" & @CRLF & _ "# to launch an OS or tool by touching it. In a submenu, touching" & @CRLF & _ "# anywhere launches the currently-selection item; there is, at present," & @CRLF & _ "# no way to select a specific submenu item. This feature is mutually" & @CRLF & _ "# exclusive with the enable_mouse feature. If both are uncommented," & @CRLF & _ "# the one read most recently takes precedence." & @CRLF & _ "#" & @CRLF & _ "#enable_touch" & @CRLF & _ "" & @CRLF & _ "# Enable mouse support. If active, this feature enables use of the" & @CRLF & _ "# computer's mouse. Note, however, that not all computers' EFIs" & @CRLF & _ "# provide the necessary underlying support, so this feature may not" & @CRLF & _ "# work for you. If it does work, you should be able to launch an" & @CRLF & _ "# OS or tool by clicking it with the mouse pointer. This feature" & @CRLF & _ "# is mutually exclusive with the enable_touch feature. If both" & @CRLF & _ "# are uncommented, the one read most recently takes precedence." & @CRLF & _ "#" & @CRLF & _ "#enable_mouse" & @CRLF & _ "" & @CRLF & _ "# Size of the mouse pointer, in pixels, per side." & @CRLF & _ "# Default is 16" & @CRLF & _ "#" & @CRLF & _ "#mouse_size 16" & @CRLF & _ "" & @CRLF & _ "# Speed of mouse tracking. Higher numbers equate to faster" & @CRLF & _ "# mouse movement. This option requires that enable_mouse be" & @CRLF & _ "# uncommented." & @CRLF & _ "# Legal values are between 1 and 32. Default is 4." & @CRLF & _ "#" & @CRLF & _ "#mouse_speed 4" & @CRLF & _ "" & @CRLF & _ "# Launch specified OSes in graphics mode. By default, rEFInd switches" & @CRLF & _ "# to text mode and displays basic pre-launch information when launching" & @CRLF & _ "# all OSes except macOS. Using graphics mode can produce a more seamless" & @CRLF & _ "# transition, but displays no information, which can make matters" & @CRLF & _ "# difficult if you must debug a problem. Also, on at least one known" & @CRLF & _ "# computer, using graphics mode prevents a crash when using the Linux" & @CRLF & _ "# kernel's EFI stub loader. You can specify an empty list to boot all" & @CRLF & _ "# OSes in text mode." & @CRLF & _ "# Valid options:" & @CRLF & _ "# osx - macOS" & @CRLF & _ "# linux - A Linux kernel with EFI stub loader" & @CRLF & _ "# elilo - The ELILO boot loader" & @CRLF & _ "# grub - The GRUB (Legacy or 2) boot loader" & @CRLF & _ "# windows - Microsoft Windows" & @CRLF & _ "# Default value: osx" & @CRLF & _ "#" & @CRLF & _ "use_graphics_for " & @CRLF & _ "" & @CRLF & _ "# Which non-bootloader tools to show on the tools line, and in what" & @CRLF & _ "# order to display them:" & @CRLF & _ "# shell - the EFI shell (requires external program; see rEFInd" & @CRLF & _ "# documentation for details)" & @CRLF & _ "# memtest - the memtest86 program, in EFI/tools, EFI/memtest86," & @CRLF & _ "# EFI/memtest, EFI/tools/memtest86, or EFI/tools/memtest" & @CRLF & _ "# gptsync - the (dangerous) gptsync.efi utility (requires external" & @CRLF & _ "# program; see rEFInd documentation for details)" & @CRLF & _ "# gdisk - the gdisk partitioning program" & @CRLF & _ "# apple_recovery - boots the Apple Recovery HD partition, if present" & @CRLF & _ "# windows_recovery - boots an OEM Windows recovery tool, if present" & @CRLF & _ "# (see also the windows_recovery_files option)" & @CRLF & _ "# mok_tool - makes available the Machine Owner Key (MOK) maintenance" & @CRLF & _ "# tool, MokManager.efi, used on Secure Boot systems" & @CRLF & _ "# csr_rotate - adjusts Apple System Integrity Protection (SIP)" & @CRLF & _ "# policy. Requires "csr_values" to be set." & @CRLF & _ "# install - an option to install rEFInd from the current location" & @CRLF & _ "# to another ESP" & @CRLF & _ "# bootorder - adjust the EFI's (NOT rEFInd's) boot order" & @CRLF & _ "# about - an "about this program" option" & @CRLF & _ "# hidden_tags - manage hidden tags" & @CRLF & _ "# exit - a tag to exit from rEFInd" & @CRLF & _ "# shutdown - shuts down the computer (a bug causes this to reboot" & @CRLF & _ "# many UEFI systems)" & @CRLF & _ "# reboot - a tag to reboot the computer" & @CRLF & _ "# firmware - a tag to reboot the computer into the firmware's" & @CRLF & _ "# user interface (ignored on older computers)" & @CRLF & _ "# fwupdate - a tag to update the firmware; launches the fwupx64.efi" & @CRLF & _ "# (or similar) program" & @CRLF & _ "# netboot - launch the ipxe.efi tool for network (PXE) booting" & @CRLF & _ "# Default is shell,memtest,gdisk,apple_recovery,windows_recovery,mok_tool,about,hidden_tags,shutdown,reboot,firmware,fwupdate" & @CRLF & _ "#" & @CRLF & _ "showtools shell,bootorder,memtest,windows_recovery,reboot,firmware,fwupdate,exit" & @CRLF & _ "" & @CRLF & _ "# Tool binaries to be excluded from the tools line, even if the" & @CRLF & _ "# general class is specified in showtools. This enables trimming an" & @CRLF & _ "# overabundance of tools, as when you see multiple mok_tool entries" & @CRLF & _ "# after installing multiple Linux distributions." & @CRLF & _ "# Just as with dont_scan_files, you can specify a filename alone, a" & @CRLF & _ "# full pathname, or a volume identifier (filesystem label, partition" & @CRLF & _ "# name, or partition GUID) and a full pathname." & @CRLF & _ "# Default is an empty list (nothing is excluded)" & @CRLF & _ "#" & @CRLF & _ "#dont_scan_tools ESP2:/EFI/ubuntu/mmx64.efi,gptsync_x64.efi" & @CRLF & _ "" & @CRLF & _ "# Boot loaders that can launch a Windows restore or emergency system." & @CRLF & _ "# These tend to be OEM-specific." & @CRLF & _ "# Default is LRS_ESP:/EFI/Microsoft/Boot/LrsBootmgr.efi" & @CRLF & _ "#" & @CRLF & _ "#windows_recovery_files LRS_ESP:/EFI/Microsoft/Boot/LrsBootmgr.efi" & @CRLF & _ "" & @CRLF & _ "# Directories in which to search for EFI drivers. These drivers can" & @CRLF & _ "# provide filesystem support, give access to hard disks on plug-in" & @CRLF & _ "# controllers, etc. In most cases none are needed, but if you add" & @CRLF & _ "# EFI drivers and you want rEFInd to automatically load them, you" & @CRLF & _ "# should specify one or more paths here. rEFInd always scans the" & @CRLF & _ "# "drivers" and "drivers_{arch}" subdirectories of its own installation" & @CRLF & _ "# directory (where "{arch}" is your architecture code); this option" & @CRLF & _ "# specifies ADDITIONAL directories to scan." & @CRLF & _ "# Default is to scan no additional directories for EFI drivers" & @CRLF & _ "#" & @CRLF & _ "#scan_driver_dirs EFI/tools/drivers,drivers" & @CRLF & _ "" & @CRLF & _ "# Which types of boot loaders to search, and in what order to display them:" & @CRLF & _ "# internal - internal EFI disk-based boot loaders" & @CRLF & _ "# external - external EFI disk-based boot loaders" & @CRLF & _ "# optical - EFI optical discs (CD, DVD, etc.)" & @CRLF & _ "# netboot - EFI network (PXE) boot options" & @CRLF & _ "# hdbios - BIOS disk-based boot loaders" & @CRLF & _ "# biosexternal - BIOS external boot loaders (USB, eSATA, etc.)" & @CRLF & _ "# cd - BIOS optical-disc boot loaders" & @CRLF & _ "# manual - use stanzas later in this configuration file" & @CRLF & _ "# firmware - boot EFI programs set in the firmware's NVRAM" & @CRLF & _ "# Note that the legacy BIOS options require firmware support, which is" & @CRLF & _ "# not present on all computers." & @CRLF & _ "# The netboot option is experimental and relies on the ipxe.efi and" & @CRLF & _ "# ipxe_discover.efi program files." & @CRLF & _ "# On UEFI PCs, default is internal,external,optical,manual" & @CRLF & _ "# On Macs, default is internal,hdbios,external,biosexternal,optical,cd,manual" & @CRLF & _ "#" & @CRLF & _ "scanfor manual,internal,external,optical" & @CRLF & _ "" & @CRLF & _ "# By default, rEFInd relies on the UEFI firmware to detect BIOS-mode boot" & @CRLF & _ "# devices. This sometimes doesn't detect all the available devices, though." & @CRLF & _ "# For these cases, uefi_deep_legacy_scan results in a forced scan and" & @CRLF & _ "# modification of NVRAM variables on each boot. Adding "0", "off", or" & @CRLF & _ "# "false" resets to the default value. This token has no effect on Macs or" & @CRLF & _ "# when no BIOS-mode options are set via scanfor." & @CRLF & _ "# Default is unset (or "uefi_deep_legacy_scan false")" & @CRLF & _ "#" & @CRLF & _ "#uefi_deep_legacy_scan" & @CRLF & _ "" & @CRLF & _ "# Delay for the specified number of seconds before scanning disks." & @CRLF & _ "# This can help some users who find that some of their disks" & @CRLF & _ "# (usually external or optical discs) aren't detected initially," & @CRLF & _ "# but are detected after pressing Esc." & @CRLF & _ "# The default is 0." & @CRLF & _ "#" & @CRLF & _ "#scan_delay 5" & @CRLF & _ "" & @CRLF & _ "# When scanning volumes for EFI boot loaders, rEFInd always looks for" & @CRLF & _ "# macOS's and Microsoft Windows' boot loaders in their normal locations," & @CRLF & _ "# and scans the root directory and every subdirectory of the /EFI directory" & @CRLF & _ "# for additional boot loaders, but it doesn't recurse into these directories." & @CRLF & _ "# The also_scan_dirs token adds more directories to the scan list." & @CRLF & _ "# Directories are specified relative to the volume's root directory. This" & @CRLF & _ "# option applies to ALL the volumes that rEFInd scans UNLESS you include" & @CRLF & _ "# a volume name and colon before the directory name, as in "myvol:/somedir"" & @CRLF & _ "# to scan the somedir directory only on the filesystem named myvol. If a" & @CRLF & _ "# specified directory doesn't exist, it's ignored (no error condition" & @CRLF & _ "# results). The default is to scan the "boot" directory in addition to" & @CRLF & _ "# various hard-coded directories." & @CRLF & _ "#" & @CRLF & _ "#also_scan_dirs boot,ESP2:EFI/linux/kernels" & @CRLF & _ "" & @CRLF & _ "# Partitions (or whole disks, for legacy-mode boots) to omit from scans." & @CRLF & _ "# For EFI-mode scans, you normally specify a volume by its label, which you" & @CRLF & _ "# can obtain in an EFI shell by typing "vol", from Linux by typing" & @CRLF & _ "# "blkid /dev/{devicename}", or by examining the disk's label in various" & @CRLF & _ "# OSes' file browsers. It's also possible to identify a partition by its" & @CRLF & _ "# unique GUID (aka its "PARTUUID" in Linux parlance). (Note that this is" & @CRLF & _ "# NOT the partition TYPE CODE GUID.) This identifier can be obtained via" & @CRLF & _ "# "blkid" in Linux or "diskutil info {partition-id}" in macOS." & @CRLF & _ "# For legacy-mode scans, you can specify any subset of the boot loader" & @CRLF & _ "# description shown when you highlight the option in rEFInd." & @CRLF & _ "# The default is "LRS_ESP"." & @CRLF & _ "#" & @CRLF & _ "#dont_scan_volumes "Recovery HD"" & @CRLF & _ "" & @CRLF & _ "# Directories that should NOT be scanned for boot loaders. By default," & @CRLF & _ "# rEFInd doesn't scan its own directory, the EFI/tools directory, the" & @CRLF & _ "# EFI/memtest directory, the EFI/memtest86 directory, or the" & @CRLF & _ "# com.apple.recovery.boot directory. Using the dont_scan_dirs option" & @CRLF & _ "# enables you to "blacklist" other directories; but be sure to use "+"" & @CRLF & _ "# as the first element if you want to continue blacklisting existing" & @CRLF & _ "# directories. You might use this token to keep EFI/boot/bootx64.efi out" & @CRLF & _ "# of the menu if that's a duplicate of another boot loader or to exclude" & @CRLF & _ "# a directory that holds drivers or non-bootloader utilities provided by" & @CRLF & _ "# a hardware manufacturer. If a directory is listed both here and in" & @CRLF & _ "# also_scan_dirs, dont_scan_dirs takes precedence. Note that this" & @CRLF & _ "# blacklist applies to ALL the filesystems that rEFInd scans, not just" & @CRLF & _ "# the ESP, unless you precede the directory name by a filesystem name or" & @CRLF & _ "# partition unique GUID, as in "myvol:EFI/somedir" to exclude EFI/somedir" & @CRLF & _ "# from the scan on the myvol volume but not on other volumes." & @CRLF & _ "#" & @CRLF & _ "dont_scan_dirs +ESP-COMET:/EFI/Boot,EFI/Microsoft/Boot,EFI/systemd" & @CRLF & _ "" & @CRLF & _ "# Files that should NOT be included as EFI boot loaders (on the" & @CRLF & _ "# first line of the display). If you're using a boot loader that" & @CRLF & _ "# relies on support programs or drivers that are installed alongside" & @CRLF & _ "# the main binary or if you want to "blacklist" certain loaders by" & @CRLF & _ "# name rather than location, use this option. Note that this will" & @CRLF & _ "# NOT prevent certain binaries from showing up in the second-row" & @CRLF & _ "# set of tools. Most notably, various Secure Boot and recovery" & @CRLF & _ "# tools are present in this list, but may appear as second-row" & @CRLF & _ "# items." & @CRLF & _ "# The file may be specified as a bare name (e.g., "notme.efi"), as" & @CRLF & _ "# a complete pathname (e.g., "/EFI/somedir/notme.efi"), or as a" & @CRLF & _ "# complete pathname with volume (e.g., "SOMEDISK:/EFI/somedir/notme.efi"" & @CRLF & _ "# or 2C17D5ED-850D-4F76-BA31-47A561740082:/EFI/somedir/notme.efi")." & @CRLF & _ "# OS tags hidden via the Delete or '-' key in the rEFInd menu are" & @CRLF & _ "# added to this list, but stored in NVRAM." & @CRLF & _ "# The default is shim.efi,shim-fedora.efi,shimx64.efi,PreLoader.efi," & @CRLF & _ "# TextMode.efi,ebounce.efi,GraphicsConsole.efi,MokManager.efi,HashTool.efi," & @CRLF & _ "# HashTool-signed.efi,bootmgr.efi,fb{arch}.efi" & @CRLF & _ "# (where "{arch}" is the architecture code, like "x64")." & @CRLF & _ "# If you want to keep these defaults but add to them, be sure to" & @CRLF & _ "# specify "+" as the first item in the new list; if you don't, then" & @CRLF & _ "# items from the default list are likely to appear." & @CRLF & _ "#" & @CRLF & _ "#dont_scan_files shim.efi,MokManager.efi" & @CRLF & _ "" & @CRLF & _ "# EFI NVRAM Boot#### variables that should NOT be presented as loaders" & @CRLF & _ "# when "firmware" is an option to "scanfor". The comma-separated list" & @CRLF & _ "# presented here contains strings that are matched against the" & @CRLF & _ "# description field -- if a value here is a case-insensitive substring" & @CRLF & _ "# of the boot option description, then it will be excluded from the" & @CRLF & _ "# boot list. To specify a string that includes a space, enclose it" & @CRLF & _ "# in quotes. Specifying "shell" will counteract the automatic" & @CRLF & _ "# inclusion of built-in EFI shells." & @CRLF & _ "#" & @CRLF & _ "#dont_scan_firmware HARDDISK,shell,"Removable Device"" & @CRLF & _ "" & @CRLF & _ "# Scan for Linux kernels that lack a ".efi" filename extension. This is" & @CRLF & _ "# useful for better integration with Linux distributions that provide" & @CRLF & _ "# kernels with EFI stub loaders but that don't give those kernels filenames" & @CRLF & _ "# that end in ".efi", particularly if the kernels are stored on a" & @CRLF & _ "# filesystem that the EFI can read. When set to "1", "true", or "on", this" & @CRLF & _ "# option causes all files in scanned directories with names that begin with" & @CRLF & _ "# "vmlinuz", "bzImage", or "kernel" to be included as loaders, even if they" & @CRLF & _ "# lack ".efi" extensions. Passing this option a "0", "false", or "off" value" & @CRLF & _ "# causes kernels without ".efi" extensions to NOT be scanned." & @CRLF & _ "# Default is "true" -- to scan for kernels without ".efi" extensions." & @CRLF & _ "#" & @CRLF & _ "scan_all_linux_kernels false" & @CRLF & _ "" & @CRLF & _ "# Combine all Linux kernels in a given directory into a single entry." & @CRLF & _ "# When so set, the kernel with the most recent time stamp will be launched" & @CRLF & _ "# by default, and its filename will appear in the entry's description." & @CRLF & _ "# To launch other kernels, the user must press F2 or Insert; alternate" & @CRLF & _ "# kernels then appear as options on the sub-menu." & @CRLF & _ "# Default is "true" -- kernels are "folded" into a single menu entry." & @CRLF & _ "#" & @CRLF & _ "#fold_linux_kernels false" & @CRLF & _ "" & @CRLF & _ "# Comma-delimited list of strings to treat as if they were numbers for the" & @CRLF & _ "# purpose of kernel version number detection. These strings are matched on a" & @CRLF & _ "# first-found basis; that is, if you want to treat both "linux-lts" and" & @CRLF & _ "# "linux" as version strings, they MUST be specified as "linux-lts,linux"," & @CRLF & _ "# since if you specify it the other way, both vmlinuz-linux and" & @CRLF & _ "# vmlinuz-linux-lts will return with "linux" as the "version string," which" & @CRLF & _ "# is not what you'd want. Also, if the kernel or initrd file includes both a" & @CRLF & _ "# specified string and digits, the "version string" includes both. For" & @CRLF & _ "# instance, "vmlinuz-linux-4.8" would yield a version string of "linux-4.8"." & @CRLF & _ "# This option is intended for Arch and other distributions that don't include" & @CRLF & _ "# version numbers in their kernel filenames, but may provide other uniquely" & @CRLF & _ "# identifying strings for multiple kernels. If this feature causes problems" & @CRLF & _ "# (say, if your kernel filename includes "linux" but the initrd filename" & @CRLF & _ "# doesn't), be sure this is set to an empty string" & @CRLF & _ "# (extra_kernel_version_strings "") or comment out the option to disable it." & @CRLF & _ "# Default is no extra version strings" & @CRLF & _ "#" & @CRLF & _ "#extra_kernel_version_strings linux-lts,linux" & @CRLF & _ "" & @CRLF & _ "# Write to systemd EFI variables (currently only LoaderDevicePartUUID) when" & @CRLF & _ "# launching Linux via an EFI stub loader, ELILO, or GRUB. This variable," & @CRLF & _ "# when present, causes systemd to mount the ESP at /boot or /efi *IF* either" & @CRLF & _ "# directory is empty and nothing else is mounted there." & @CRLF & _ "# Default is "false"" & @CRLF & _ "#" & @CRLF & _ "#write_systemd_vars true" & @CRLF & _ "" & @CRLF & _ "# Set the maximum number of tags that can be displayed on the screen at" & @CRLF & _ "# any time. If more loaders are discovered than this value, rEFInd shows" & @CRLF & _ "# a subset in a scrolling list. If this value is set too high for the" & @CRLF & _ "# screen to handle, it's reduced to the value that the screen can manage." & @CRLF & _ "# If this value is set to 0 (the default), it's adjusted to the number" & @CRLF & _ "# that the screen can handle." & @CRLF & _ "#" & @CRLF & _ "#max_tags 0" & @CRLF & _ "" & @CRLF & _ "# Set the default menu selection. The available arguments match the" & @CRLF & _ "# keyboard accelerators available within rEFInd. You may select the" & @CRLF & _ "# default loader using:" & @CRLF & _ "# - A digit between 1 and 9, in which case the Nth loader in the menu" & @CRLF & _ "# will be the default." & @CRLF & _ "# - A "+" symbol at the start of the string, which refers to the most" & @CRLF & _ "# recently booted loader." & @CRLF & _ "# - Any substring that corresponds to a portion of the loader's title" & @CRLF & _ "# (usually the OS's name, boot loader's path, or a volume or" & @CRLF & _ "# filesystem title)." & @CRLF & _ "# You may also specify multiple selectors by separating them with commas" & @CRLF & _ "# and enclosing the list in quotes. (The "+" option is only meaningful in" & @CRLF & _ "# this context.)" & @CRLF & _ "# If you follow the selector(s) with two times, in 24-hour format, the" & @CRLF & _ "# default will apply only between those times. The times are in the" & @CRLF & _ "# motherboard's time standard, whether that's UTC or local time, so if" & @CRLF & _ "# you use UTC, you'll need to adjust this from local time manually." & @CRLF & _ "# Times may span midnight as in "23:30 00:30", which applies to 11:30 PM" & @CRLF & _ "# to 12:30 AM. You may specify multiple default_selection lines, in which" & @CRLF & _ "# case the last one to match takes precedence. Thus, you can set a main" & @CRLF & _ "# option without a time followed by one or more that include times to" & @CRLF & _ "# set different defaults for different times of day." & @CRLF & _ "# The default behavior is to boot the previously-booted OS." & @CRLF & _ "#" & @CRLF & _ "default_selection 2" & @CRLF & _ "#default_selection Microsoft" & @CRLF & _ "#default_selection "+,bzImage,vmlinuz"" & @CRLF & _ "#default_selection Maintenance 23:30 2:00" & @CRLF & _ "#default_selection "Maintenance,macOS" 1:00 2:30" & @CRLF & _ "" & @CRLF & _ "# Enable VMX bit and lock the CPU MSR if unlocked." & @CRLF & _ "# On some Intel Apple computers, the firmware does not lock the MSR 0x3A." & @CRLF & _ "# The symptom on Windows is Hyper-V not working even if the CPU" & @CRLF & _ "# meets the minimum requirements (HW assisted virtualization and SLAT)" & @CRLF & _ "# DO NOT SET THIS EXCEPT ON INTEL CPUs THAT SUPPORT VMX! See" & @CRLF & _ "# http://www.thomas-krenn.com/en/wiki/Activating_the_Intel_VT_Virtualization_Feature" & @CRLF & _ "# for more on this subject." & @CRLF & _ "# The default is false: Don't try to enable and lock the MSR." & @CRLF & _ "#" & @CRLF & _ "#enable_and_lock_vmx false" & @CRLF & _ "" & @CRLF & _ "# Tell a Mac's EFI that macOS is about to be launched, even when it's not." & @CRLF & _ "# This option causes some Macs to initialize their hardware differently than" & @CRLF & _ "# when a third-party OS is launched normally. In some cases (particularly on" & @CRLF & _ "# Macs with multiple video cards), using this option can cause hardware to" & @CRLF & _ "# work that would not otherwise work. On the other hand, using this option" & @CRLF & _ "# when it is not necessary can cause hardware (such as keyboards and mice) to" & @CRLF & _ "# become inaccessible. Therefore, you should not enable this option if your" & @CRLF & _ "# non-Apple OSes work correctly; enable it only if you have problems with" & @CRLF & _ "# some hardware devices. When needed, a value of "10.9" usually works, but" & @CRLF & _ "# you can experiment with other values. This feature has no effect on" & @CRLF & _ "# non-Apple computers." & @CRLF & _ "# The default is inactive (no macOS spoofing is done)." & @CRLF & _ "#" & @CRLF & _ "#spoof_osx_version 10.9" & @CRLF & _ "" & @CRLF & _ "# Set the CSR values for Apple's System Integrity Protection (SIP) feature." & @CRLF & _ "# Values are two-byte (four-character) hexadecimal numbers. These values" & @CRLF & _ "# define which specific security features are enabled. Below are the codes" & @CRLF & _ "# for what the values mean. Add them up (in hexadecimal!) to set new values." & @CRLF & _ "# Apple's "csrutil enable" and "csrutil disable" commands set values of 10" & @CRLF & _ "# and 877, respectively. (Prior to OS 11, 77 was used rather than 877; 877" & @CRLF & _ "# is required for OS 11, and should work for OS X 10.x, too.)" & @CRLF & _ "# CSR_ALLOW_UNTRUSTED_KEXTS 0x0001" & @CRLF & _ "# CSR_ALLOW_UNRESTRICTED_FS 0x0002" & @CRLF & _ "# CSR_ALLOW_TASK_FOR_PID 0x0004" & @CRLF & _ "# CSR_ALLOW_KERNEL_DEBUGGER 0x0008" & @CRLF & _ "# CSR_ALLOW_APPLE_INTERNAL 0x0010" & @CRLF & _ "# CSR_ALLOW_UNRESTRICTED_DTRACE 0x0020" & @CRLF & _ "# CSR_ALLOW_UNRESTRICTED_NVRAM 0x0040" & @CRLF & _ "# CSR_ALLOW_DEVICE_CONFIGURATION 0x0080" & @CRLF & _ "# CSR_ALLOW_ANY_RECOVERY_OS 0x0100" & @CRLF & _ "# CSR_ALLOW_UNAPPROVED_KEXTS 0x0200" & @CRLF & _ "# CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE 0x0400" & @CRLF & _ "# CSR_ALLOW_UNAUTHENTICATED_ROOT 0x0800" & @CRLF & _ "#csr_values 10,877" & @CRLF & _ "" & @CRLF & _ "# Include a secondary configuration file within this one. This secondary" & @CRLF & _ "# file is loaded as if its options appeared at the point of the "include"" & @CRLF & _ "# token itself, so if you want to override a setting in the main file," & @CRLF & _ "# the secondary file must be referenced AFTER the setting you want to" & @CRLF & _ "# override. Note that the secondary file may NOT load a tertiary file." & @CRLF & _ "#" & @CRLF & _ "#include manual.conf" & @CRLF & _ "" & @CRLF & _ "# Sample manual configuration stanzas. Each begins with the "menuentry"" & @CRLF & _ "# keyword followed by a name that's to appear in the menu (use quotes" & @CRLF & _ "# if you want the name to contain a space) and an open curly brace" & @CRLF & _ "# ("{"). Each entry ends with a close curly brace ("}"). Common" & @CRLF & _ "# keywords within each stanza include:" & @CRLF & _ "#" & @CRLF & _ "# volume - identifies the filesystem from which subsequent files" & @CRLF & _ "# are loaded. You can specify the volume by filesystem" & @CRLF & _ "# label, by partition label, or by partition GUID number" & @CRLF & _ "# (but NOT yet by filesystem UUID number)." & @CRLF & _ "# loader - identifies the boot loader file" & @CRLF & _ "# initrd - Specifies an initial RAM disk file" & @CRLF & _ "# icon - specifies a custom boot loader icon" & @CRLF & _ "# ostype - OS type code to determine boot options available by" & @CRLF & _ "# pressing Insert. Valid values are "MacOS", "Linux"," & @CRLF & _ "# "Windows", and "XOM". Case-sensitive." & @CRLF & _ "# graphics - set to "on" to enable graphics-mode boot (useful" & @CRLF & _ "# mainly for MacOS) or "off" for text-mode boot." & @CRLF & _ "# Default is auto-detected from loader filename." & @CRLF & _ "# options - sets options to be passed to the boot loader; use" & @CRLF & _ "# quotes if more than one option should be passed or" & @CRLF & _ "# if any options use characters that might be changed" & @CRLF & _ "# by rEFInd parsing procedures (=, /, #, or tab)." & @CRLF & _ "# disabled - use alone or set to "yes" to disable this entry." & @CRLF & _ "#" & @CRLF & _ "# Note that you can use either DOS/Windows/EFI-style backslashes (\)" & @CRLF & _ "# or Unix-style forward slashes (/) as directory separators. Either" & @CRLF & _ "# way, all file references are on the ESP from which rEFInd was" & @CRLF & _ "# launched." & @CRLF & _ "# Use of quotes around parameters causes them to be interpreted as" & @CRLF & _ "# one keyword, and for parsing of special characters (spaces, =, /," & @CRLF & _ "# and #) to be disabled. This is useful mainly with the "options"" & @CRLF & _ "# keyword. Use of quotes around parameters that specify filenames is" & @CRLF & _ "# permissible, but you must then use backslashes instead of slashes," & @CRLF & _ "# except when you must pass a forward slash to the loader, as when" & @CRLF & _ "# passing a root= option to a Linux kernel." & @CRLF & _ "" & @CRLF & _ "# Below are several sample boot stanzas. All are disabled by default." & @CRLF & _ "# Find one similar to what you need, copy it, remove the "disabled" line," & @CRLF & _ "# and adjust the entries to suit your needs." & @CRLF & _ "" & @CRLF & _ "# A sample entry for a Linux 3.13 kernel with EFI boot stub support" & @CRLF & _ "# on a partition with a GUID of 904404F8-B481-440C-A1E3-11A5A954E601." & @CRLF & _ "# This entry includes Linux-specific boot options and specification" & @CRLF & _ "# of an initial RAM disk. Note uses of Linux-style forward slashes." & @CRLF & _ "# Also note that a leading slash is optional in file specifications." & @CRLF & _ "menuentry Linux {" & @CRLF & _ " icon EFI/refind/icons/os_linux.png" & @CRLF & _ " volume 904404F8-B481-440C-A1E3-11A5A954E601" & @CRLF & _ " loader bzImage-3.3.0-rc7" & @CRLF & _ " initrd initrd-3.3.0.img" & @CRLF & _ " options "ro root=UUID=5f96cafa-e0a7-4057-b18f-fa709db5b837"" & @CRLF & _ " disabled" & @CRLF & _ "}" & @CRLF & _ "" & @CRLF & _ "# Below is a more complex Linux example, specifically for Arch Linux." & @CRLF & _ "# This example MUST be modified for your specific installation; if nothing" & @CRLF & _ "# else, the PARTUUID code must be changed for your disk. Because Arch Linux" & @CRLF & _ "# does not include version numbers in its kernel and initrd filenames, you" & @CRLF & _ "# may need to use manual boot stanzas when using fallback initrds or" & @CRLF & _ "# multiple kernels with Arch. This example is modified from one in the Arch" & @CRLF & _ "# wiki page on rEFInd (https://wiki.archlinux.org/index.php/rEFInd)." & @CRLF & _ "menuentry "Arch Linux" {" & @CRLF & _ " icon /EFI/refind/icons/os_arch.png" & @CRLF & _ " volume "Arch Linux"" & @CRLF & _ " loader /boot/vmlinuz-linux" & @CRLF & _ " initrd /boot/initramfs-linux.img" & @CRLF & _ " options "root=PARTUUID=5028fa50-0079-4c40-b240-abfaf28693ea rw add_efi_memmap"" & @CRLF & _ " submenuentry "Boot using fallback initramfs" {" & @CRLF & _ " initrd /boot/initramfs-linux-fallback.img" & @CRLF & _ " }" & @CRLF & _ " submenuentry "Boot to terminal" {" & @CRLF & _ " add_options "systemd.unit=multi-user.target"" & @CRLF & _ " }" & @CRLF & _ " disabled" & @CRLF & _ "}" & @CRLF & _ "" & @CRLF & _ "# A sample entry for loading Ubuntu using its standard name for" & @CRLF & _ "# its GRUB 2 boot loader. Note uses of Linux-style forward slashes" & @CRLF & _ "menuentry Ubuntu {" & @CRLF & _ " loader /EFI/ubuntu/grubx64.efi" & @CRLF & _ " icon /EFI/refind/icons/os_linux.png" & @CRLF & _ " disabled" & @CRLF & _ "}" & @CRLF & _ "" & @CRLF & _ "# A minimal ELILO entry, which probably offers nothing that" & @CRLF & _ "# auto-detection can't accomplish." & @CRLF & _ "menuentry "ELILO" {" & @CRLF & _ " loader \EFI\elilo\elilo.efi" & @CRLF & _ " disabled" & @CRLF & _ "}" & @CRLF & _ "" & @CRLF & _ "# Like the ELILO entry, this one offers nothing that auto-detection" & @CRLF & _ "# can't do; but you might use it if you want to disable auto-detection" & @CRLF & _ "# but still boot Windows...." & @CRLF & _ "menuentry "Windows 7" {" & @CRLF & _ " loader \EFI\Microsoft\Boot\bootmgfw.efi" & @CRLF & _ " disabled" & @CRLF & _ "}" & @CRLF & _ "" & @CRLF & _ "# EFI shells are programs just like boot loaders, and can be" & @CRLF & _ "# launched in the same way. You can pass a shell the name of a" & @CRLF & _ "# script that it's to run on the "options" line. The script" & @CRLF & _ "# could initialize hardware and then launch an OS, or it could" & @CRLF & _ "# do something entirely different." & @CRLF & _ "menuentry "Windows via shell script" {" & @CRLF & _ " icon \EFI\refind\icons\os_win.png" & @CRLF & _ " loader \EFI\tools\shell.efi" & @CRLF & _ " options "fs0:\EFI\tools\launch_windows.nsh"" & @CRLF & _ " disabled" & @CRLF & _ "}" & @CRLF & _ "" & @CRLF & _ "# MacOS is normally detected and run automatically; however," & @CRLF & _ "# if you want to do something unusual, a manual boot stanza may" & @CRLF & _ "# be the way to do it. This one does nothing very unusual, but" & @CRLF & _ "# it may serve as a starting point. Note that you'll almost" & @CRLF & _ "# certainly need to change the "volume" line for this example" & @CRLF & _ "# to work." & @CRLF & _ "menuentry "My macOS" {" & @CRLF & _ " icon \EFI\refind\icons\os_mac.png" & @CRLF & _ " volume "macOS boot"" & @CRLF & _ " loader \System\Library\CoreServices\boot.efi" & @CRLF & _ " disabled" & @CRLF & _ "}" & @CRLF & _ "" & @CRLF & _ "# The firmware_bootnum token takes a HEXADECIMAL value as an option" & @CRLF & _ "# and sets that value using the EFI's BootNext variable and then" & @CRLF & _ "# reboots the computer. This then causes a one-time boot of the" & @CRLF & _ "# computer using this EFI boot option. It can be used for various" & @CRLF & _ "# purposes, but one that's likely to interest some rEFInd users is" & @CRLF & _ "# that some Macs with HiDPI displays produce lower-resolution" & @CRLF & _ "# desktops when booted through rEFInd than when booted via Apple's" & @CRLF & _ "# own boot manager. Booting using the firmware_bootnum option" & @CRLF & _ "# produces the better resolution. Note that no loader option is" & @CRLF & _ "# used in this type of configuration." & @CRLF & _ "menuentry "macOS via BootNext" {" & @CRLF & _ " icon /EFI/refind/icons/os_mac.png" & @CRLF & _ " firmware_bootnum 80" & @CRLF & _ " disabled" & @CRLF & _ "}" & @CRLF & _ "" & @CRLF & _ "menuentry "System Rescue" {" & @CRLF & _ " icon /EFI/refind/next-theme/icons/os_rescue.png" & @CRLF & _ " volume Extended_Boot_Loader" & @CRLF & _ " loader /rescue/vmlinuz-linux-lts" & @CRLF & _ " initrd /rescue/initramfs-linux-lts.img" & @CRLF & _ " options "root=LABEL=SafeGuard_Comet rootflags=noatime rw consoleblank=0 initrd=\arch\intel-ucode.img"" & @CRLF & _ " submenuentry "Boot with fallback initramfs" {" & @CRLF & _ " initrd /initramfs-linux-lts-fallback.img" & @CRLF & _ " }" & @CRLF & _ " submenuentry "Boot to CLI (no display manager)" {" & @CRLF & _ " add_options "systemd.unit=multi-user.target"" & @CRLF & _ " }" & @CRLF & _ " submenuentry "Boot to systemd rescue.target" {" & @CRLF & _ " add_options "systemd.unit=rescue.target"" & @CRLF & _ " }" & @CRLF & _ "}" & @CRLF & _ "" & @CRLF & _ "menuentry "Arch Linux" {" & @CRLF & _ " icon /EFI/refind/next-theme/icons/os_arch.png" & @CRLF & _ " volume Extended_Boot_Loader" & @CRLF & _ " loader /arch/vmlinuz-linux-zen" & @CRLF & _ " initrd /arch/initramfs-linux-zen.img" & @CRLF & _ " options "zfs=comet/roots/arch rootflags=noatime rw quiet consoleblank=0 splash loglevel=3 rd.udev.log_priority=3 rd.systemd.show_status=auto vt.global_cursor_default=0 initrd=\arch\intel-ucode.img"" & @CRLF & _ " submenuentry "No splash & verbose startup" {" & @CRLF & _ " options "zfs=comet/roots/arch rootflags=noatime rw consoleblank=0 initrd=\arch\intel-ucode.img"" & @CRLF & _ " }" & @CRLF & _ " submenuentry "Boot with fallback InitRAMFS" {" & @CRLF & _ " initrd /arch/initramfs-linux-zen-fallback.img" & @CRLF & _ " options "zfs=comet/roots/arch rootflags=noatime rw consoleblank=0 initrd=\arch\intel-ucode.img"" & @CRLF & _ " }" & @CRLF & _ " submenuentry "Boot to CLI (no display manager)" {" & @CRLF & _ " options "zfs=comet/roots/arch rootflags=noatime rw consoleblank=0 systemd.unit=multi-user.target initrd=\arch\intel-ucode.img"" & @CRLF & _ " }" & @CRLF & _ " submenuentry "Boot to systemd rescue.target" {" & @CRLF & _ " options "zfs=comet/roots/arch rootflags=noatime rw consoleblank=0 systemd.unit=rescue.target initrd=\arch\intel-ucode.img"" & @CRLF & _ " }" & @CRLF & _ "}" & @CRLF & _ "" & @CRLF & _ "menuentry "Gentoo" {" & @CRLF & _ " icon /EFI/refind/next-theme/icons/os_gentoo.png" & @CRLF & _ " volume Extended_Boot_Loader" & @CRLF & _ " loader /gentoo/gent-zen.krn" & @CRLF & _ " initrd /gentoo/genthost.ird" & @CRLF & _ " options "root=ZFS=comet/roots/gentoo rootflags=noatime rw quiet consoleblank=0 initrd=\intel-ucode.img"" & @CRLF & _ " submenuentry "Boot with fallback initramfs" {" & @CRLF & _ " initrd /gentfull.ird" & @CRLF & _ " }" & @CRLF & _ " submenuentry "Boot to CLI (no display manager)" {" & @CRLF & _ " add_options "systemd.unit=multi-user.target"" & @CRLF & _ " }" & @CRLF & _ " submenuentry "Boot to systemd rescue.target" {" & @CRLF & _ " add_options "systemd.unit=rescue.target"" & @CRLF & _ " }" & @CRLF & _ "}" & @CRLF & _ "" & @CRLF & _ "menuentry "Windows 10" {" & @CRLF & _ " loader \EFI\Microsoft\Boot\bootmgfw.efi" & @CRLF & _ "}" & @CRLF & _ "" & @CRLF & _ "include next-theme/theme.conf" & @CRLF & _ "" Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH) Local $aFullArray[0] For $i = 0 To UBound($aArray) -1 _ArrayConcatenate($aFullArray, $aArray[$i]) Next $aArray = $aFullArray ; Present the entire match result _ArrayDisplay($aArray, "Result")

Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm