Limit String Length using a Regular Expression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Inbaraj
    New Member
    • Apr 2007
    • 76

    #1

    Limit String Length using a Regular Expression

    Hi..

    With the help of the Regular Expression can we Cut a string to certain length. if yes plz help me with sample codeing...

    with regards
    Inbaraj.D
  • Shashi Sadasivan
    Recognized Expert Top Contributor
    • Aug 2007
    • 1435

    #2
    Originally posted by Inbaraj
    Hi..

    With the help of the Regular Expression can we Cut a string to certain length. if yes plz help me with sample codeing...

    with regards
    Inbaraj.D
    Hi,
    please provide with the example and pattern you want to cut off.
    Sometimes you wont need regex after all.

    Comment

    • Inbaraj
      New Member
      • Apr 2007
      • 76

      #3
      Originally posted by Shashi Sadasivan
      Hi,
      please provide with the example and pattern you want to cut off.
      Sometimes you wont need regex after all.
      hi..

      Regular Expression is new to me..

      reg
      Inba

      Comment

      • Shashi Sadasivan
        Recognized Expert Top Contributor
        • Aug 2007
        • 1435

        #4
        Originally posted by Inbaraj
        hi..

        Regular Expression is new to me..

        reg
        Inba
        Example of what you want????

        Comment

        • Inbaraj
          New Member
          • Apr 2007
          • 76

          #5
          Originally posted by Shashi Sadasivan
          Example of what you want????
          Regular Expression to Cut a string to certain length

          Comment

          • Shashi Sadasivan
            Recognized Expert Top Contributor
            • Aug 2007
            • 1435

            #6
            Originally posted by Inbaraj
            Regular Expression to Cut a string to certain length
            [0-9a-zA-Z]{n}
            where n is the length

            alternatively, look at MSDN..... and check the substring

            And try search engines first !
            there is already too much information for things like this out there

            Comment

            Working...