in reply to Re^2: Doesn't work in Cygwin
in thread Doesn't work in Cygwin

Do you have a suggestion how you would handle the matching procedure here? The randomized lists consist of a particular type of string (a reference ID) and these same kinds of strings are in the list to match array elements.
The latter case you describe cannot happen with these, but I guess some meta-characters might conceivably be able to feature in the reference IDs.

Would you suggest using \Q?

Replies are listed 'Best First'.
Re^4: Doesn't work in Cygwin
by bart (Canon) on Nov 16, 2005 at 17:17 UTC
    It depends on what you really want. If you just want to test for equality, I'd use eq. If you want to test if a string is a substring of another string, I'd use index. I'd only use regular expressions only as a very last resort, when indeed you need more power in functionality than offered by the above, such as wildcarding (in which case, use "." instead of "?" and ".*" instead of "*").

    Yes, in the latter case, quotemeta could have its uses.