mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-29 19:13:49 +01:00
Merge pull request #3054 from ApamNapat/simplified_redundant_regex
Removed redundant repetitions of | in alias regex
This commit is contained in:
commit
f802b95b30
@ -36,7 +36,7 @@ export function printAliases(): void {
|
|||||||
|
|
||||||
// Returns true if successful, false otherwise
|
// Returns true if successful, false otherwise
|
||||||
export function parseAliasDeclaration(dec: string, global = false): boolean {
|
export function parseAliasDeclaration(dec: string, global = false): boolean {
|
||||||
const re = /^([\w|!|%|,|@|-]+)=(("(.+)")|('(.+)'))$/;
|
const re = /^([\w|!%,@-]+)=(("(.+)")|('(.+)'))$/;
|
||||||
const matches = dec.match(re);
|
const matches = dec.match(re);
|
||||||
if (matches == null || matches.length != 7) {
|
if (matches == null || matches.length != 7) {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user