0

I assume there's more to it than just a colon followed by any amount of any non-whitespace characters.

I believe this is PDO specific, but if it is SQL specific, I am using Oracle SQL.

I'm trying to compose a regex to match all named parameters in a query, so I need the exact rules, eg, max length, allowed characters, does it have to start with an alphabet char, et cetera.

I was unable to find the answer on the manual pages for PDO::prepare, PDO::execute, or PDO::bindParam, or from a quick Google search.

A link to some kind of spec would be great, if anyone knows where to find it.

I wrestled a bear once.
  • 22,983
  • 19
  • 69
  • 116
  • Think https://stackoverflow.com/questions/5809951/pdo-valid-characters-for-placeholders is the answer. – Nigel Ren Jun 07 '21 at 13:04
  • Thanks Nigel! I closed the question as duplicate, will leave this one here to add visibility to the other question. I knew that if there was an answer Common Sense would know it. – I wrestled a bear once. Jun 07 '21 at 13:12

0 Answers0