QRegExp use find forward slash(/) and backward slash(\)
I am using QRegExp for file path. I have 2 type of file path.
i use QRegExp for first type. like @QRegExp rx("([a-z A-Z]:\\|\\\\)"); @
how to write QRegExp for forward slash(/) file path?
I never tried, but I guess escaping will do the trick @/@
I tried not find the forward slash(/)
the forward slash / has no special meaning in regular expressions.
works for both backward and forward slashes. (Note I've removed the whitespace character from the drive letter)
But beware, you should also allow unix paths like "/home/dermanu", so possibly group "[a-zA-Z]:" together and make it optional by appending a "?" character