<p>I'm trying to write a RegEx for a code generator (in C#) to determine a proper class or package name of an AS3 class.</p>

<p>I know that class names</p>

<ul>
<li>must start with a letter (capital or otherwise)</li>
<li>any other digit can be alphanumeric</li>
<li>cannot have spaces</li>
</ul>

<p>Is there anything else?</p>

[{'answer_id': 22290, 'author': 'Matt MacLean', 'author_id': 22, 'author_profile': 'https://Stackoverflow.com/users/22', 'pm_score': 1, 'selected': False, 'text': '<p>Here are some more valid classes. </p>\n\n<p>Actionscript 3 classes (and packages) must start with a letter, "_", or "$". They may also contain (but not start with) a number.</p>\n\n<pre><code>public class $Test {}\npublic class _Test {}\npublic class test {}\n</code></pre>\n'}, {'answer_id': 72319, 'author': 'Iain', 'author_id': 11911, 'author_profile': 'https://Stackoverflow.com/users/11911', 'pm_score': 2, 'selected': False, 'text': '<p>Although you can start class names with lower case letters and include underscores and dollar signs, the "naming <strong>convention</strong>" is to start the class name and each separate word with a capital letter (e.g. UsefulThing), and not include underscores. When I see classes like <code>useful_thing</code>, it looks wrong, because it\'s not the naming <strong>convention</strong>. Maybe your question should have said what are the <strong>valid</strong> names for an AS3 class?</p>\n\n<p>Other than that I think you + maclema have it.</p>\n'}, {'answer_id': 82938, 'author': 'Martin', 'author_id': 15840, 'author_profile': 'https://Stackoverflow.com/users/15840', 'pm_score': 2, 'selected': False, 'text': '<p>The conventions for Class and Package naming as far as I\'ve heard:</p>\n\n<p>The package structure should use the "flipped domain" naming, with lowercase folders and CamelCased class names, i.e.: </p>\n\n<pre><code>import com.yourdomain.nameofsubfolder.YourSpecialClass;\n</code></pre>\n\n<p>This is reflected in all of the packages shipped with Flash and Flex. Examples:</p>\n\n<pre><code>import flash.events.MouseEvent;\nimport flash.display.MovieClip;\n</code></pre>\n\n<p>There is also a convention of naming Interfaces after the functionality they add or impose as in: <code>Styleable</code>, <code>Drawable</code>, <code>Movable</code> etc... Many (including Adobe) also prefer to use an upper case "I" to mark interfaces clearly as such, i.e.: </p>\n\n<pre><code>IEventDispatcher\nIExternalizable \nIFocusManager\n</code></pre>\n\n<p>which are all internal interfaces in the <code>flash.*</code> packages.</p>\n'}]
['https://Stackoverflow.com/questions/21698', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1306/']