in reply to Re: Truncating Filename string
in thread Truncating Filename string
You said it (so I'm just repeating what you said ;^).
Remember that "\w" represents alphanumerics and underscore -- no need to add "\d" to a character class when "\w" is already there.
This will result in the desired output.
... for the three examples provided, but not for file names that contain dashes, plus-signs, tildes, colons, ... Better not to try to match the file name content (since you don't need to).
|
|---|