I have a table in MySQL containing regex pattern such as : FILE\\\\d{1,4}.
But while trying to retrieve the pattern value with a Java code, it seems like the value is not in the good format.
How can I store this value in MySQL, to be able to retrieve the exact value I want in the code : FILE\\d{1,4}
Thank you in advance.
-
Inside the quotes presumably.Roman C– Roman C2013-05-16 18:26:35 +00:00Commented May 16, 2013 at 18:26
-
Please, I don't get you ?Harry Coder– Harry Coder2013-05-16 18:34:25 +00:00Commented May 16, 2013 at 18:34
-
Ok, wait I'm connecting to the my MySQL server...Roman C– Roman C2013-05-16 18:36:15 +00:00Commented May 16, 2013 at 18:36
-
I've retrieved exactly the value you need.Roman C– Roman C2013-05-16 18:42:31 +00:00Commented May 16, 2013 at 18:42
-
1Give me a code sample. I will better understand !Harry Coder– Harry Coder2013-05-16 19:20:34 +00:00Commented May 16, 2013 at 19:20
|
Show 3 more comments
1 Answer
It is OK now. For this case, I just have to insert the regex pattern in the table with 4 backslash (\\) and while I retrieve it from the data base within JAVA, I got two backslashs (\). It is due to the escape character that MySQL applied. Thank you !
1 Comment
Edward Falk
Note: you can Accept your own answer as the correct one if you like.