Extract file extension: Difference between revisions

Content deleted Content added
m →‎Task: clarify
→‎Task: Replace the test-cases with more realistic ones (that also catch more edge cases). This doesn't change the task requirements.
Line 27:
! Comment
|-
| <code>pictureimage.jpg</code>
| <code>.jpg</code>
|
|-
| <code><nowiki>http://mywebsiteexample.com/picture/imagedownload.tar.pnggz</nowiki></code>
| <code>.pnggz</code>
|
|-
| <code>myuniquefile.longextensiondesktop</code>
| <code>.longextensiondesktop</code>
|
|-
| <code>IAmAFileWithoutExtensiondocument</code>
| <code></code>
| ''empty string''
|-
| <code>/path/todocument.my/filetxt_backup</code>
| <code></code>
| ''empty string, asbecause the period<code>_</code> is in the directory name rathernot thana theletter fileor namenumber''
|-
| <code>file/etc/pam.odd_oned/login</code>
| <code></code>
| ''empty string, becauseas <code>_</code>the period is notin the parent directory name arather letterthan orthe numberfilename''
|}