简体   繁体   中英

How to paste a formatted text without its formatting in Android Studio?

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.

Good answer from Mohan:

I had never tried this simple thing. Its called "Paste Simple". Hotkey: Ctrl + Alt + Shift + V . This solves my problem.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM