Can an extension only appear if the selection contains no spaces?

Wanted to revive an older question and boil it down to its basic issue:

Is there any way to detect in an PopClip extension so say: “I only appear if the selection contains no spaces”?

You could use the regex property for that. The regex something like:

^[^ ]+$

which would match if the whole input consists of non-space characters but fail if any of the characters is a space.

1 Like

Cool. Didn’t know of the regex key. Very powerful! Thanks.

1 Like