Two Backslash in SQL procedure with regular expression

0 votes

On SQL procedure where i saw a Regular expression which contains this piece -

REGEXP '\\s*count\\s*\\('

why there are two backslash ? what's the meaning of this code?
May 26, 2022 in Others by polo
• 1,480 points
408 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Backslash is taken at multiple levels.

It's the escape prefix in regular expressions: it makes special characters like . and escape sequences like \s which means any whitespace character.

In order for regular expression character to get a literal backslash, you need to escape the backslash itself.

This is common in many programming languages, some have "raw string literals" where escape sequences are not processed,  to avoid having to double the slashes
answered May 30, 2022 by anisha
• 140 points

edited Mar 5

Related Questions In Others

0 votes
1 answer

How to merge two cells in excel with same field name

Insert 2 new columns, G & H. Enter ...READ MORE

answered Oct 7, 2022 in Others by narikkadan
• 63,600 points
1,831 views
0 votes
0 answers

SQL Query with NOT LIKE IN

Please help me to write a sql ...READ MORE

Nov 4, 2022 in Others by gaurav
• 23,260 points
516 views
0 votes
1 answer
0 votes
1 answer
+1 vote
0 answers

How to split a number with coma betweeen two colunms

Jul 3, 2019 in Others by anonymous
1,069 views
0 votes
1 answer

two back slash in SQL procedure with Regular expression

It's the escape prefix in regular expressions: ...READ MORE

answered Feb 2, 2022 in Database by Vaani
• 7,070 points
1,798 views
0 votes
1 answer

Removing all white-spaces from a string

You can use the 'str_replace_all()' function from ...READ MORE

answered May 16, 2018 in Data Analytics by Bharani
• 4,660 points
695 views
0 votes
1 answer

What Regex to use to identify a Block Hash?

Blockhashes are always 64 characters in length. You ...READ MORE

answered Aug 28, 2018 in Blockchain by digger
• 26,740 points
2,029 views
0 votes
1 answer

R programming logic

Use gsub to match the substring that we want ...READ MORE

answered Nov 16, 2018 in Data Analytics by Maverick
• 10,840 points
924 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP