I am trying to come up with a regular expressions that will match against a string allowing regular letters, hyphens, unicode letters, numbers, spaces, newlines (\n or \r\n) but no punctuation of any sort.That's fairly trivial, once you know what you want to match, and what you don't want to. You say "hyphen" but "no punctuation of any sort". But a hyphen is punctuation of some sort. And in Unicode, there are many kinds of dashes. And what do you mean by "punctuation"? Do you consider a WHITE FROWNING FACE to be punctuation? What about a SNOWMAN? As for 'letters', Unicode defines what it considers 'letters'. Does that match your idea of letters? And numbers, do you mean digits? Anything numerical? And what are "spaces" in your definition? All 20+ spaces in the Unicode standard? Probably not, because that includes all the various linelines, and you mention them explicitly.
In short, your definition of what you want to match and what you don't is too vague to do anything with. And once it's exact, writing the regexp is easy.
In reply to Re: Unicode regular expressions
by JavaFan
in thread Unicode regular expressions
by SilasTheMonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |