[xsd-users] Needs help removing underscore character in anonymous regex option

Alejandro Claro alejandro.claro at gmail.com
Wed Dec 5 12:25:56 EST 2012


Sorry Boris,

It was my fault. In the options file, regular expression should not have
quotation* *marks.

Thanks a lot,
Alejandro.


On Wed, Dec 5, 2012 at 11:32 AM, Alejandro Claro
<alejandro.claro at gmail.com>wrote:

> Thanks a lot Boris,
>
> This solution looks great but I get an error:
>
>  invalid anonymous type regex: ''%.* .* (.+/)*([^-_]+)%\u$1\u$2%'':
> missing third pattern-substitution separator
>
> Thanks,
> Alejandro
>
>
> On Wed, Dec 5, 2012 at 11:00 AM, Boris Kolpackov <boris at codesynthesis.com>wrote:
>
>> 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
>>
>
>
>
> --
> "Imagination is more important than knowledge. For knowledge is limited to
> all we now know and understand, while imagination embraces the entire
> world, and all there ever will be to know and understand. "
> -  Albert Einstein.
>



-- 
"Imagination is more important than knowledge. For knowledge is limited to
all we now know and understand, while imagination embraces the entire
world, and all there ever will be to know and understand. "
-  Albert Einstein.


More information about the xsd-users mailing list