Describe the problem/error/question
Hi Community,
I’m not a big fan of regexp, but I understand it is very powerful.
I’m trying to format french telephon numbers.
Final format should be +33999999999
This expression (almost) works
{{$json["Téléphone"].replace(/^(?:\+?33|0)?(?:[ .-]?)(\d{9})$/, '+33$1')}}
When input is 33999999999, return should be +33999999999, however, with the regexp above, it returns an empty string
What is the error message (if any)?
no error
Please share your workflow
Share the output returned by the last node
Information on your n8n setup
- n8n version: 1.55.3
- Database (default: SQLite): SQLite
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): npm
- Operating system: Windows 11