1

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.

8
  • Inside the quotes presumably. Commented May 16, 2013 at 18:26
  • Please, I don't get you ? Commented May 16, 2013 at 18:34
  • Ok, wait I'm connecting to the my MySQL server... Commented May 16, 2013 at 18:36
  • I've retrieved exactly the value you need. Commented May 16, 2013 at 18:42
  • 1
    Give me a code sample. I will better understand ! Commented May 16, 2013 at 19:20

1 Answer 1

1

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 !

Sign up to request clarification or add additional context in comments.

1 Comment

Note: you can Accept your own answer as the correct one if you like.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.