stdlib: Implement subst function.
[goals.git] / docs / Goalfile.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 Goalfile - introduction, tutorial, and reference for writing goal files
6
7 =head1 SUMMARY
8
9 =head1 INTRODUCTION
10
11 =head1 TUTORIAL
12
13 =head1 REFERENCE
14
15 =head2 Standard Functions
16
17 =head3 subst (from, to, text)
18
19 For example:
20
21  subst ("aa", "AA", "aabbccaa") ⇒ "AAbbccAA"
22  subst ("a.*c", "b", "aaacac") ⇒ "bb"
23
24 This function works something like make’s C<subst> function, except
25 that C<from> is a regular expression, specifically a L<sed(1)>
26 extended regular expression.
27
28 =head1 SEE ALSO
29
30 L<goals(1)>.
31
32 =head1 AUTHORS
33
34 Richard W.M. Jones <rjones@redhat.com>
35
36 =head1 COPYRIGHT
37
38 Copyright (C) 2020 Richard W.M. Jones
39
40 Copyright (C) 2020 Red Hat Inc.
41
42 This program is free software; you can redistribute it and/or modify
43 it under the terms of the GNU General Public License as published by
44 the Free Software Foundation; either version 2 of the License, or
45 (at your option) any later version.
46
47 This program is distributed in the hope that it will be useful,
48 but WITHOUT ANY WARRANTY; without even the implied warranty of
49 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
50 GNU General Public License for more details.
51
52 You should have received a copy of the GNU General Public License along
53 with this program; if not, write to the Free Software Foundation, Inc.,
54 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.