
If you are one of those people who visualize things physically better than in the abstract, then Regex Marble Run by [bottomless] might be for you. Visualize Regular Expressions with Marbles. You enter a test expression and a string, and the site generates a virtual marble machine that lets you see the regular expression pick apart the string in a physical way.
Click this link, and youโll see the regular expression โ^[hH]ack.[dD][^0-9]*$โ which, if you arenโt a regular expression user, might seem a bit cryptic. It is fairly simple if you take it bit-by-bit. The caret character tells it to match the start of the string.
So โ^dogโ will match โdogโ and โdog foodโ but wonโt match โfood for a dog.โ The following bit โ[hH]โ will match either โhโ or โHโ. Then there is โackโ which is just what you think it is. So a string starting with โhackโ or โHackโ might match (depending on the rest of the expression.
Discover more from ChuckysCarnage
Subscribe to get the latest posts sent to your email.
