I don't see it checking by default. So I should use <regexmatch> specifically to detect the invalid characters, right? Could you give an example?

asked 21 Nov '12, 19:31

gt8967884's gravatar image

accept rate: 12%

This depends on what your invalid characters are. Is this caused by the application not handling certain letters (i.e. Unicode) in path correctly. If so, the recommended approach is to create a regular expression that throws away invalid values:

    <text>Invalid value</text>

The above will catch any character that may be illegal, including Unicode characters. This may cause issues for some OSes where paths may include non-latin characters, though.

Another option is to create a regular expression that checks that the path matches a specific pattern or only uses acceptable characters. For example:

    <text>Invalid value</text>

This only accepts basic ascii characters, slash and back slash.


answered 22 Nov '12, 04:32

wojciechka's gravatar image

wojciechka ♦♦
accept rate: 26%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 21 Nov '12, 19:31

Seen: 1,301 times

Last updated: 22 Nov '12, 04:32