Tagged Questions
2
votes
1answer
97 views
RegEx in java to replace a String
I've been trying to replace this mathematical function x^2*sqrt(x^3) to this pow(x,2)*Math.sqrt(pow(x,3))
so this is the regex
/([0-9a-zA-Z\.\(\)]*)^([0-9a-zA-Z\.\(\)]*)/ pow(\1,\2)
it works ...
2
votes
1answer
97 views
Java: How do I replace an “oval” or “rectangle” graphic with an imported PNG file?
I imported:
import javax.swing.ImageIcon;
and I used this code to import the PNG file. (i know i can create a black square easily, but it is the importing any image to my game that i want).
Image ...
1
vote
1answer
275 views
Replace text with an image docx4j
I have an word template. There is an word photo that has to be replaced with an image. This has to be done with Docx4Java.
How do I do this?
1
vote
1answer
549 views
Java : replacing all URLs with anchor tags that aren't already in anchor tags
I'm trying to replace all non-anchor-tag-enclosed URLs within anchor-tag-enclosed URLs for a document. So given the string:
I have two urls for google: <a ...
0
votes
1answer
155 views
docx Template Docx4j replacing text in Java
Im new to Docx4j and my task is to replace some Text of a docx Template.
I read the getting Started Guide of docx4j but I don't think I fully understood the whole concept.
Well Anyway... I already ...
0
votes
1answer
37 views
String conversion unexpected
I got unexpected behavior while performing several operation on String.
I found:
String expectedString="ami\303\261o"; its output is like: amiño
String str="ami\\303\\261o"; its output is like: ...
0
votes
1answer
67 views
How to remove the text within the specified starting and ending lines in java
I am writing scripts to a text file with comments using java. Inside the comment, my sql script is written. I am writing my scripts within the comment actions starts and actions ends and I want the ...
0
votes
1answer
102 views
java jdk replace native class-file
I have ImageView.class how to get the program to use it instead of the native javax.swing.text.html.ImageView?
javax.swing.text.html.ImageView map = new javax.swing.text.html.ImageView(); //does not ...
0
votes
0answers
23 views
Jacob + MS Word need some advice
It just reads the first result of search and replace it but can not search & replace all.
Source:
ActiveXComponent oWord = new ActiveXComponent("Word.Application");
...
0
votes
0answers
125 views
Java regular expression finding special char in non-comments
after I switched workspace encoding to UTF-8 and back (Windows-ISO), all my (German) umlauts got converted to �.
I want to replace all the � by Eclipse Find/Replace with static references.
...
0
votes
0answers
44 views
Read a text file and import it into a filter sortof
I want to take a file that says:
wordone
somthing16
wordsof
varyinglengths
What I want to do is have
message.replace(textabove, "***")
And have it loop so that it covers anything in the text ...
0
votes
0answers
76 views
Replacing a fragment with another fragment android
I create fragment like this
List<Fragment> fragments = new Vector<Fragment>();
fragments.add(Fragment.instantiate(this,OkulSehir.class.getName()));
...
0
votes
0answers
93 views
Comparing vs database and if word exist replace it with “*”.length Java
I am trying to create a program and as a part of the feature users that log in have an about me section, in it they are not supposed to be able to use any forbidden words, I have a database of bad ...
0
votes
0answers
81 views
Why won't my image change when I tell it to?
Im pretty new at programming please understand that a lot of this code may not be 'optimal' however I am learning.
My program works like this: A grid of 15x15 is 32pxx32px squares is created based ...
0
votes
0answers
205 views
Handling multiple string replacements
I'm using Java. I have to replace a lot of strings using readLines[i].replace("string1", "string2") command. 190 strings, if you must know. However, some replace methods are not working. I write:
for ...