Forum Discussion
- Marsha_R
Champion Level 3
https://support.smartbear.com/viewarticle/81060/
Look at the table for the section regarding backslash. I think that will help you.
- mcastellanosOccasional Contributor
Thank you for your reply.
I looked at that table initially and that is how I came up with the posted expression; however, something is wrong obviously. I was in the hopes that someone here could identify the issue with it. Again, thank you for any light someone can shed on it.
- NisHeraValued Contributor
your regex not not working since
1)you have broken YYYY in to two(like this 08/30/20/1616:31:48)
2) haven't specify the space between year and hours pat of time
try following ....haven't tested but hope no syntax errors........
\d\d/\d\d/\d\d\d\d\s\d\d:\d\d:\d\d( - Attempting to connect to DMM.)
ps. not sure : is a special character or not if so hav to use \:
- baxatobCommunity Hero
This regex will match your string:
(\d{2}\/\d{2}\/\d{4}) (\d{2}:\d{2}:\d{2}) - (Attempting to connect to DMM\.)
Please remember that / delimiter (as well as another delimiters) always should be escaped by backslash \
Also it is better to escape the dot character: \. Otherwise it will match any character.
And if you group different logical members of your string inside parentheses, it makes your regex more readable.
Great online tool to check your regex: https://regex101.com/
- mcastellanosOccasional Contributor