GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
List::Regexp(3) User Contributed Perl Documentation List::Regexp(3)

regexp_opt - Convert list of strings to a regular expression

use List::Regexp qw(:all);

my $s = regexp_opt(@strings);

my $s = regexp_opt(\%opts, @strings);

Returns a regular expression that will match any string from the input list @strings. First argument can be a reference to a hash, which controls how the regexp is built.

Valid keys are:

type => pcre|posix|emacs
Controls the flavor of the generated expression: Perl-compatible (the default), POSIX extended, or Emacs.
match => default|exact|word
If default, the expression will match any word from @strings appearing as a part of another word.

If exact, the expression will match a word from @strings appearing on a line alone.

If word, the expression will match single words only.

debug => 0|1
If 1, enable debugging output.
group => 0|1
If 1, enclose entire regexp in a group.

GPLv3+: GNU GPL version 3 or later, see <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Sergey Poznyakoff <gray@gnu.org>
2021-02-13 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.