Reputation: 184
I am using Android Studio for programming. I have faced difficulties many times while copying regular expressions. Whenever I copy any regex and paste it, it removes the escape character every time and I have to manually type those escapes to make it a valid regex again. I tried to check intelliJ settings but did not get any option to turn off this feature.
This question did not answer my question fully but I realised that it is a problem in java itself.
Please guide me how to avoid this problem especially since the regex strings sometimes run into hundreds of characters and it becomes difficult to track all the changes.
Upvotes: 5
Views: 3503
Reputation: 43033
Good answer from Mohan:
I had never tried this simple thing. Its called "Paste Simple". Hotkey: Ctrl+Alt+Shift+V. This solves my problem.
Upvotes: 14
Reputation: 16842
No such problem with Eclipse/ADT, at least with the regex you posted. If pasting into a comment (and making it a string later) does not help, you may try to use an external text editor, like NotePad or gedit.
Upvotes: 0