Added: 4 years ago
From: bermnz
Views: 6,892
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (5)

Sign In or Sign Up now to post a comment!
  • ' ~ s/\s+$// ' - it doesn't really remove the trailing whitespace. any alternative to do the job?

  • to the first question thats a regex that checks the first char in a string $ is the end

  • what does "/^\" do?

  • @vonHypermiler

    I have the same question.

    I think the circumflex ^ makes it start at the start of the string, and $ makes it start at the end, but otherwise I'm not sure.

    Also, "/^\" wouldn't do anything, it's only "/^\ " that would do something, because the \ character "escapes" the space. "\ +" matches all spaces in the document.

    Google doesn't really give much in the way of answers, either.

  • Very Helpful!

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more