![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Kind people, I have a little puzzlement. In the first select, I double the backslash and return true. In the second, I don't and get false. Have I missed something important in the docs? |
#3
| |||
| |||
|
|
David Fetter wrote: I have a little puzzlement. In the first select, I double the backslash and return true. In the second, I don't and get false. Have I missed something important in the docs? I don't know if it is clear in the docs anywhere wrt regex, but the string literal parser will consume one layer of backslashes on you. So in your first case '\\d' is fed into the regex matching function as '\d' (string literal parser sees \\ == escape \ == \), and in the second case '\d' is fed in as 'd' (string literal parser sees \d == escape d == d). The basic rule at work here is you need to double up all backslashes. |
#4
| |||
| |||
|
|
I have a little puzzlement. In the first select, I double the backslash and return true. In the second, I don't and get false. Have I missed something important in the docs? |
![]() |
| Thread Tools | |
| Display Modes | |
| |