|
| 1 | +# SPDX-FileCopyrightText: 2025 ryoskzypu <[email protected]> |
| 2 | +# |
| 3 | +# SPDX-License-Identifier: MIT-0 |
| 4 | +# |
| 5 | +# License: |
| 6 | +# MIT No Attribution |
| 7 | +# |
| 8 | +# Copyright (c) 2025 ryoskzypu <[email protected]> |
| 9 | +# |
| 10 | +# Permission is hereby granted, free of charge, to any person obtaining a copy of this |
| 11 | +# software and associated documentation files (the "Software"), to deal in the Software |
| 12 | +# without restriction, including without limitation the rights to use, copy, modify, |
| 13 | +# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to |
| 14 | +# permit persons to whom the Software is furnished to do so. |
| 15 | +# |
| 16 | +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, |
| 17 | +# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A |
| 18 | +# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
| 19 | +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
| 20 | +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 21 | +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 22 | +# |
1 | 23 | # colorize_regex.pl — colorize highlight regex matches in chat messages |
2 | 24 | # |
3 | 25 | # Description: |
|
22 | 44 | # History: |
23 | 45 | # 2025-03-26, ryoskzypu <[email protected]>: |
24 | 46 | # version 1.0: initial release |
25 | | -# |
26 | | -# License: |
27 | | -# MIT No Attribution |
28 | | -# |
29 | | -# Copyright (c) 2025 ryoskzypu <[email protected]> |
30 | | -# |
31 | | -# Permission is hereby granted, free of charge, to any person obtaining a copy of this |
32 | | -# software and associated documentation files (the "Software"), to deal in the Software |
33 | | -# without restriction, including without limitation the rights to use, copy, modify, |
34 | | -# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to |
35 | | -# permit persons to whom the Software is furnished to do so. |
36 | | -# |
37 | | -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, |
38 | | -# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A |
39 | | -# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
40 | | -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
41 | | -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
42 | | -# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
43 | 47 |
|
44 | 48 | use strict; |
45 | 49 | use warnings; |
|
104 | 108 | (?> \o{032} | \o{033}) |
105 | 109 | [\o{001}-\o{006}] |
106 | 110 | | |
| 111 | +<<<<<<< HEAD |
107 | 112 | \o{031}\o{034} # Reset color and keep attributes |
108 | 113 | /x; |
109 | 114 | my $reset_rgx = qr/\o{034}/; |
|
115 | 120 | ($reset_rgx) # Reset all |
116 | 121 | | |
117 | 122 | # Bytes |
| 123 | +======= |
| 124 | + \o{031}\o{034} # Reset color and keep attributes |
| 125 | + /x; |
| 126 | +my $reset_rgx = qr/\o{034}/; |
| 127 | +my $split_rgx = qr/ |
| 128 | + ($colors_rgx) # Colors |
| 129 | + | |
| 130 | + ($attr_rgx) # Attributes |
| 131 | + | |
| 132 | + ($reset_rgx) # Reset all |
| 133 | + | |
| 134 | + # Bytes |
| 135 | +>>>>>>> 6669973 (New script colorize_regex.pl: colorize highlight regex matches in chat messages) |
118 | 136 | /x; |
119 | 137 |
|
120 | 138 | # Space hex code. |
|
0 commit comments