Blog Archives

Using verbal expressions to make regex easy in PowerShell

What it means is that, we write ‘Four times X plus 3 equals seven’, and get ‘4x+3=7′. That example, could be a little misleading so let try it again, a valid url would consist of http at the begining of the line, maybe s if you are accessing a secure site, then it will have ://, maybe www. if you are so inclined to type and anything but a space. The aim of verbal expressions is to let you type the above and get a regular expression that matches a URL which is this: this:’^(?:http)(?:s)?(?:://)(?:www.)?(?:[^\ ])$’

Tagged with: , , , , ,
Posted in Fun-Stuff, PowerShell