I'm trying to match a string exactly in another string.
'-w'
And I have a few different string target formats below.
`string -w`
`string -wy`
`string -w string`
`string -wy string`
I've tried the basic check but it matches all of the above four strings, expected:
`if "-w" in string`
I've a tried regex pattern like below but it matches one of the above strings, again expected.
`-ks\s`
The expected outcome would be for -w
to only be found in the below two strings.
`string -w`
`string -w string`
Any help greatly appreciated.