dsaba Posted February 27, 2008 Share Posted February 27, 2008 java variables can start with $ or a-z and followed by a-z, 0-9, and _ Here's my attempt at matching them: ~(?<![\$_\w])(?:\$[a-z]|[a-z])[\w_]*~s Yes i'm aware that such patterns can exist within java comments and string statements, but don't worry about this So how can you match it? Link to comment https://forums.phpfreaks.com/topic/93263-preg-matching-java-variables/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.