Is there an easy way to remove comments from a text file in Java.
now: :- /* #pos=1,513 */ author(A, UniqueVar1) after: author(A, UniqueVar1)
I used BufferedReader and readline to read and split lines.
try the following:
line.replaceAll("(?:/\\*(?:[^*]|(?:\\*+[^*/]))*\\*+/)|(?://.*)|(?::-)","");
Source: https://habr.com/ru/post/1673681/More articles:The emulator cannot connect to the device - windows-phoneLink to the same js files from multiple locations using partial views - javascriptAdding business logic to spring-data-rest application - javaWhere to place business logic within spring mvc? - javaUnable to place div over iframe in IE - htmlhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1673682/shell-access-to-persistent-volume-in-google-cloud&usg=ALkJrhjoxGGODOvGyiZII6SHkd0HmR3xcAGoogle Chrome dev tools donβt display website on developer machine (when remote debugging Android device) - google-chrome-devtoolsPandas dataframe format for json - jsonHow to check positional notes of notes in format strings using msgfmt? - c ++Is it wise to sync a local variable? - javaAll Articles