Re: regex observation & question regarding re:escape()

new topic     » goto parent     » topic index » view thread      » older message » newer message
mattlewis said...

When using regular expressions, I'd recommend using the ` ` backtick style quotes because you don't have to escape anything ...

Matt

Just to clarify - 'anything' is referring to characters in a text string. Special characters treated as literals in the regex itself must still be escaped.

Yes, sorry. I meant that you don't have to escape any characters for the purposes of euphoria reading in the text. So:

"foo\\.txt" 
 
-- could be written as: 
 
`foo\.txt` 

You need to escape the period because that's a special character in regular expressions. But you don't need to escape the backslash itself.

Matt


Got it! Thanks for all your help. I really appreciate it!
Regards,
jd

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu