Explaining the mysteries of [regexp]

davidestevens's icon

This intro to regular expressions might be useful if, like me, you are unfamiliar with them...

woyteg's icon

I always find string formatting frustrating, that's gonna be really helpful! Thanks!!

Mark Durham's icon

Me too.. thanks David!

vichug's icon

yay, noob friendly regexp tutorial. thanks !

vichug's icon

a question though... the underscore at the end of character class range is not quite explained ?... i mean :
" a word character is \w which is [0-9A-Za-z_] "
i don't understand why there is an underscore ? why not simply [0-9A-Za-z] ?

pdelges's icon
Max Patch
Copy patch and select New From Clipboard in Max.

"_" is part of the character class.
Try this:

vichug's icon

oh, okay, simply that. But why is it part of "word character" then ?