Regular Expressions: Remove Whitespace from Start and End
Sometimes whitespace characters around strings are not wanted but are there. Typical processing of strings is to remove the whitespace at the start and end of it.
Write a regex and use the appropriate string methods to remove whitespace at the beginning and end of strings.
Note
The .trim() method would work here, but you'll need to complete this challenge using regular expressions.
Sometimes whitespace characters around strings are not wanted but are there. Typical processing of strings is to remove the whitespace at the start and end of it.
Write a regex and use the appropriate string methods to remove whitespace at the beginning and end of strings.
Note
The .trim() method would work here, but you'll need to complete this challenge using regular expressions.
No comments:
Post a Comment