Get last 11 characters

A swapping-ground for Regular Expression syntax

Get last 11 characters

Postby yesMyLord » Sat Sep 17, 2016 11:54 am

For example:
My Folder - Updated - AxYs34ep1ko

to

AxYs34ep1ko

Thank you!
yesMyLord
 
Posts: 3
Joined: Sat Sep 17, 2016 11:52 am

Re: Get last 11 characters

Postby KenP » Sat Sep 17, 2016 12:09 pm

Try this.

RegEx (1)
Match: (.*)(.{11})
Replace: \2
KenP
 
Posts: 196
Joined: Sat Jul 30, 2016 11:25 am

Re: Get last 11 characters

Postby yesMyLord » Sat Sep 17, 2016 12:15 pm

Thanks! :)
yesMyLord
 
Posts: 3
Joined: Sat Sep 17, 2016 11:52 am

Re: Get last 11 characters

Postby yesMyLord » Sat Sep 17, 2016 4:20 pm

There are some unexpected results when having arabic, russian or emojis in the name though:

When using the black heart emoji in the folder: http://emojipedia.org/emoji/%E2%9D%A4/

It won't get the code.

Folder - <<EMOJI> - AxYs34ep1ko

Is there any way to fetch from there too?
yesMyLord
 
Posts: 3
Joined: Sat Sep 17, 2016 11:52 am

Re: Get last 11 characters

Postby therube » Sun Sep 18, 2016 3:03 pm

Are you saying it is not working for a file name such as:

"Folder - ? - AxYs34ep1ko.TXT"

Because that looks to work here.


(Ah, I see the board ate the :heart:, so in my name, '?' would be the :heart: emoji.)

Image
therube
 
Posts: 347
Joined: Mon Jan 18, 2016 6:23 pm

Re: Get last 11 characters

Postby KenP » Sun Sep 18, 2016 4:51 pm

It seems to be working for me to, I've tried it with several emoji and Arabic characters in the same file name and it seems to work fine.
KenP
 
Posts: 196
Joined: Sat Jul 30, 2016 11:25 am


Return to Regular Expressions