I don't know how else to search for it than 'regex only extract substring' which doesn't bring it up.

I have text that goes:

WORDnonsenseWARDnonseneWIRD

I want to extract all the W*RD ones, but only that bit.

Now if I search for W*RD it only gives me one result which is the whole thing.

@kurt try W.RD if it's always one character, W.*?RD to minimize the number of characters caught by the wildrard

@monorail @kurt there's also the overkill solutions of going

W[A-Z]RD or even W[^R]+RD

The former looks for any uppercase letter between W and RD. The latter looks for a sequence of anything that isn't R between W and Rd, which guarantees that an RD isn't included in the middle part.

@zatnosk @monorail @kurt ...i am choosing to read these as various forms of the word "Wizard"

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!