Reputation: 2740
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.
Upvotes: 1
Views: 499
Reputation: 2740
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 !
Upvotes: 1