base64-regex
base64-regex copied to clipboard
The regex can't match some base64 string
438026444 convert to base64 string is NDM4MDI2NDQ0, the regex can't match this.
This function works well.
Me also facing some issue testing some base64 strings such as "NTkxNjVSRUZVSV9JU19QaGFybWFjeV9TdGFmZixBc3Npc3RhbnRNYW5hZ2Vy"
When I validate those base64-strings it validates them as correct.
This regex seems working well:
(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{4})
Wow... after three years I am checking this issue again... and still the catastrophic backtracking version is not updated.