Javascript RegEx: capture -A but not A-A. where A is any letter in the set [A-Za-z]. dash followed by letter passes, dash surrounded by letters doesnt

let stringTest = “-this -andthis but-not-this”

// match = [‘-this’, ‘-andthis’]
and ignore “but-not-this”

so I want to capture anything defined by

Here is my attempt to ignore the A-A situation:

I see this as match anything except for any letter followed by a dash followed by any letter.

It doesnt work as expected (problem with nesting characters sets within a negation set?) nor do I know how to combine it with the expression that matches -A

Is this possible? Part of my confusion is in understanding how to nest character sets and/or characters groups within the negation character set [^ignoreStuffHere]

Thanks in advance

It may help to explain why:

I am receiving strings containing “flag” “data” pairs
where a flag is -flag and the data associated with that flag is the following non-flag characters/words

for example

-flag1 data1 data1 can be long -flag2 data2 -flag3 data3-has dashes in it but isnt a flag

and I am trying to split this up and store them as flag+data sub strings

const pairsArray = arguments.slice(arguments.indexOf('-'))
        .replace(/(/ -)/g, '-')

where the pairsArray for the example above SHOULD look like:

pairsArray = ['flag1 data1 data1 can be long',
 'flag2 data2',
 'flag3 data3-has dashes in it but isnt a flag' 

instead it is considering each dash surrounded by letters (data with dashes, not flags) and splitting those up

pairsArray = ['flag1 data1 data1 can be long',
 'flag2 data2',
 'flag3 data3',
 '-has dashes in it but isnt a flag' 

How about?

let stringTest = "-this -andthis but-not-this";

  stringTest.match(/(?:^| )-[A-Za-z]+/g).map(s => s.trim())

For the updated case, you could try split on the space that is followed by a dash: