Welcome Forums General PowerShell Q&A How to sort the word which has a dot . and paranthesis() using powershell

Viewing 1 reply thread
  • Author
    Posts
    • #172450
      Participant
      Topics: 4
      Replies: 9
      Points: 28
      Rank: Member

      I want to sort out all the words which has the below structure :

      .getMethod(param);

      .getMethod1();

      The structure is a . dot followed by word which is followed by () paranthesis and ; semicolon.

    • #172483
      Participant
      Topics: 9
      Replies: 431
      Points: 736
      Helping Hand
      Rank: Major Contributor
      $WordList = @(
          '.getMethod(param);'
          '.getMethod1();'
          '.putthis(that);'
          '.getthis();'
          '.getthis(that);'
      )
      $WordList | sort 
      
      • #172492
        Participant
        Topics: 4
        Replies: 9
        Points: 28
        Rank: Member

        Thanks Sam . Will give it a try .

Viewing 1 reply thread
  • The topic ‘How to sort the word which has a dot . and paranthesis() using powershell’ is closed to new replies.