Support » Plugin: Media Rename » Error in regex for files with multiple periods

  • Resolved Thlayli


    Line 16 needs to be:
    preg_match('~.*/(.*)\.(.*?)$~', $post->guid, $file_parts);

    As it is the filename “Tob.-Couns.-referral-form.pdf” only allows editing “Tob” and recognizes the rest as the extension. It looks like the regex is correct on line 98.

    Apologies if I overlooked something.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ShadowsDweller


    Fixed. Thanks for reporting!

    I also have trouble with this. But not in the same way as above. It actually shows the New Filename field, but in its content, it shows my domain name (without the .com), and to the right of the field, it shows .com/services/what-to-expect/what-to-expect-2, where what-to-expect-2 is the actual name of the file, and all the rest is the path to the page in which I have that image inserted (I’m using %postname% as permalink structure).

    Should the plugin display the full name including domain name and path for the file, or just the file name?

    I can send you a screenshot if you need to see what I see.

    Thank you!

    Plugin Author ShadowsDweller



    Did this issue happen on the latest version (2.0.2)? If so, please send me a screenshot.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error in regex for files with multiple periods’ is closed to new replies.