Search code examples
javaandroideasyimage

How Only get name easyImage Android?


Before

[/data/user/0/com.example.hx_loom.evpa/cache/EasyImage/a85f8011-10d5-4050-89d2-1e575da55522.jpg,

/data/user/0/com.example.hx_loom.evpa/cache/EasyImage/4737a29f-7df2-4e1f-abe3-18b71293d76e.jpg]

After a85f8011-10d5-4050-89d2-1e575da55522.jpg,4737a29f-7df2-4e1f-abe3-18b71293d76e.jpg

please help me this algoritma


Solution

  • If the pattern of the directory of your images is always the same you can incorporate a regular expression to parse everything after EasyImage/.

    You can use:

    ([^\/]+)(?=$)
    

    It matches any character after the last slash.