Your question is unclear.
If I copy this exact same string and invoke isearch-forward-regexp
Emacs does not find the dates.
What do you mean by that?
Isearch doesn't automatically search for the last string you copied.
If you mean (and this is my best guess) that you typed C-M-sC-y then that's doing a regexp-quote
on the copied text to search for it verbatim (but you would see this in the modified regexp shown in the minibuffer).
If it's not that, then tell us specifically what you are doing (give exact keystrokes), what you are expecting, and what's actually happening?
Edit: The comments confirm that the above guess was accurate, so the solution is as follows...
Rather than doing this: C-M-sC-y (which results in the pasted text being passed through regexp-quote
)
Instead, do this: C-M-sM-eC-yRET
I.e.: Call isearch-edit-string
to edit the search pattern in the minibuffer and then yank the copied text.
re-builder
provides for different syntax (read
,string
,rx
) (see the docs for explanation). Depending on the syntax, the grouping parens and the multiplier braces have to be preceded by either a single (forstring
syntax) or a double (forread
syntax) backslash to match. I cannot get any matches without them, so I'm not sure how you manage to get matches inre-builder
.[0-9]\{4\}/[0-9]\{2\}/[0-9]\{2\}
works (i.e. without the capturing group). As tore-builder
I havereb-re-syntax
set to'string
. The double escapes made no difference.\(... \)
: plain parens are not special - they just match themselves.