[xsd-users] Needs help removing underscore character in
anonymous regex option
Boris Kolpackov
boris at codesynthesis.com
Wed Dec 5 11:00:01 EST 2012
Hi Alejandro,
Alejandro Claro <alejandro.claro at gmail.com> writes:
> -anonymous-regex '%.* .* (.+/)*(.+)%\u$1\u$2%'
>
> but I don't like the '/', '-' and '_' characters are replaced by '_'
> character in the type name.
>
> Is there a way to change the replacing character?
>
> I would like to set it to none ('') and would be wonderful if I can made
> the type name PascalCase after remove or replace the characters.
You would need to create a series of regexes that handle one-word, two-
word, etc., names. Then you can replace the delimiters with a character
of your choice and also capitalize the words:
--anonymous-regex '%.* .* (.+/)*([^-_]+)%\u$1\u$2%'
--anonymous-regex '%.* .* (.+/)*([^-_]+)[-_]([^-_]+)%\u$1\u$2\u$3%'
...
You may also want to place all these options into an options file (see
the --options-file option) to make your command line more manageable.
Boris
More information about the xsd-users
mailing list