Both are indeed correct. An article is only necessary in the superlative (or comparative) if the adjective is attributive (i.e. is in the same phrase as the noun it is describing).

Consider the following examples:


  
  Example #1:
  
  John is the fastest boy.
  *John is fastest boy.
  
  Example #2
  
  John is the fastest among his friends.
  John is fastest among his friends.
  
  


As is shown in the examples above, omitting the in #1 causes it to become ungrammatical, as the superlative fastest is in the same phrase as its noun boy. In #2, however, the may be freely omitted as it is not attributive.

Some English superlatives, however, use the adverb most, which can cause some amount of confusion. Consider the following examples:


  
  Mary is the most beautiful.
  Mary is most beautiful.
  Mary is a most beautiful woman.
  


All three of these examples are grammatical and show the overlap of an adverbial intensification with the superlative. With the definite article the, it can only be a superlative, but with the indefinite article a it can only be interpreted adverbially (i.e. essentially the same as "very beautiful"). Both of these forms, however, allow omission of the article, and so the meaning of #2 is left ambiguous.

Note that there is a third form which is related to the superlative known as the elative. While it is not a separate inflection, it can be shown to exist in constructions such as the following:


  
  It is with the greatest pleasure [...]
  


This sentence is generally understood not to mean with a pleasure greater than any other, but rather something more akin to with extreme pleasure.

Superlatives with "the"
I want a regular Expression which replaces a string with its respective character in descending order including number: 
i.e.


replace a alphanumeric string with descending order string 
if special characters are found in sting keep the as it is 


I means :
                                            
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
Z   Y   X   W   V   U   T   S   R   Q   P   O   N   M   L   K   J   I   H   G   F   E   D   C   B   A



0   1   2   3   4   5   6   7   8   9
9   8   7   6   5   4   3   2   1   0


Few examples:

1) ABC*1230 -> ZYX*8739

2) Hello World! -> Svool Dliow!

3) Good &amp; Bad   -> Tllw &amp; Yzw   
