I want to split a string in Java with the following format: "value^1" so that I get the initial part, "value" in a string.  I wanted to use split instead of substring, so I tried this:  string.split("^")[0]   but unfortunately ^ is a special character and I guess it has to be escaped. I tried split("\^") but no luck.  Anybody knows how to achieve this using split?  Thanks!
I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?
I've noticed the following happen a few times:   A user posts a question. The question is closed as a duplicate and the usual "Possible Duplicate" links are added at the top. The user promptly removes the duplicate links, even though the question is still closed as a duplicate. (excessive use of list items =P)   Now, I could understand this behavior if there was some dispute about whether or not the question was a duplicate, and the OP were to remove the links and post reasons why they disagree with the closing. However, I've noticed this happening without any attempt to defend the question (such as ).  In my opinion, no one should be allowed to remove the "Possible Duplicate" links as long as the question is still closed as a duplicate. The links should remain for the benefit of the community, so they can navigate to the duplicate questions and either post answers there or read them over and judge if the closing was actually fair. Once/if the question is reopened the links could be edited out if one so chooses.  I guess this is part discussion, part feature request:  Could the "Possible Duplicate" links remain un-editable for as long as the question is still closed? Is there a "previous sibling" selector? Command for creating a directory and navigating into it directly? Calling the base constructor in C# Prove that : $\displaystyle \lim_{n\to \infty} \frac{1}{n+1}+\frac{1}{n+2}+\frac{1}{n+3}+\cdots+\frac{1}{2n}=\ln 2$    the only thing I could think of is that it can be written like this :  $$ \lim_{n\to \infty} \sum_{k=1}^n \frac{1}{k+n} =\lim_{n\to \infty} \frac{1}{n} \sum_{k=1}^n \frac{1}{\frac{k}{n}+1}=\int_0^1 \frac{1}{x+1} \ \mathrm{d}x=\ln 2$$  is my answer right ? and are there any other method ?(I'm sure there are) How can I dual boot Windows and Ubuntu? I currently have Windows 7 on my computer and I want to install Ubuntu alongside Windows safely.  Could someone please provide clear instructions? Baking with oven without bottom heating element My mom wants to do baking but her oven doesn't have bottom heating element. It only has an element on top, with a fan at the back.  She told me that she can't make me a good pizza or cake without it.  Is there any way around? I am trying to filter items with a stored procedure using like. The column is a varchar(15). The items I am trying to filter have square brackets in the name.  For example:  WC[R]S123456.  If I do a LIKE 'WC[R]S123456' it will not return anything.  I found some information on using the ESCAPE keyword with LIKE but I do not understand how to use it to treat the square brackets as a regular string. How to pass multiple operator properties via UI layout? How to make Portable QGIS 3 Is it possible to make QGIS 3 portable with changed location for Qgis setup parameters folder.  For QGIS 2 it looked like this in qgis.bat file:     qgis --optionspath "X:\qgis" --configpath "X:\qgisini"   For QGIS 3 it doesn't work. Setup parameters are default placed in:      C:\Users\xxx\AppData\Roaming\QGIS Inequality: $ab^2+bc^2+ca^2 \le 4$, when $a+b+c=3$. Let $a,b,c $ are non-negative real numbers, and $a+b+c=3$.  How to prove inequality $$ ab^2+bc^2+ca^2\le 4.\tag{*} $$    In other words, if $a,b,c$ are non-negative real numbers, then how to prove inequality $$ 27(ab^2+bc^2+ca^2)\le 4(a+b+c)^3.\tag {**} $$ $\color{gray}{\mbox{(Without using "universal" Lagrange multipliers method).}}$  Thanks! How can I make a fake name when I use command blocks? I'm trying to make a mini game but I want it so that when you press a button over a command block it will say "BOB welcome", so 'bob' instead of the @a or @p sign and then followed by the message. All I know is that I need to use /tellraw. What are some good examples of a function  $f : \mathbb{R} \to \mathbb{R}$ where its derivative is equal to its inverse? I attempted to find a monomial that satisfied it by starting with $f(x) = ax^b$ and showing that $f^{-1}(x) = f'(x) \implies b-1=\frac{1}{b} \implies b=\phi$ and got $$f(x) = \frac{x^\phi}{\sqrt[\phi]{\phi}}$$ Which seems to work according to WolframAlpha, but I'm having trouble double-checking it. Any other ideas? I have one script to allow for one user to run. The string calling it from the command line looks like  ./script path/to/folder -a option='value'   When I try to add it to the other commands in Cmnd_Alias line, sudo blames sudoers file for incorrect syntax. How can I set such commands properly? Let $R= \mathbb{Q}[x^2 ,x^3 ]$, the set of all polynomials over $\mathbb{Q}$ with no $x$ term. Show that the $\gcd$ of $x^5$ and $x^6$ does not exist I just attempted to fix a typo on a question on cooking.stackexchange.com and saw this     Oops! Your edit couldn't be submitted because:         Your edit summary must be at least 10 characters   This edit is less than 6 characters; surely more can be improved with your edit?      So, misspelled words have to just be left misspelled?  That could prevent the post from being found in a search. How do I diagnose the source of focus problem in a camera? Probably a novice question, but how do I correctly diagnose from a photo for what reason that camera wasn't able to focus properly?  It can be any 1 of the following   Unsteady hand Lens issue Metering Re-Calibration required in camera or ...   Is there a set of unsaid protocols that needs to be followed by a photographer?  Goal is to get a sharp and crisp image prior to editing.  [PS: I own a Nikon D5200.] Say a creature owns multiple items with wording similar to this:  As an Action, you may speak the command word to [...]  Say the creature has deliberately obtained such items, perhaps by creating them itself, to have the same command word. Can this creature use one action to speak the shared command word and activate multiple items at once? The purpose of this question is not to cheese my DM. I am writing a short story and like to keep my D&amp;D fiction as close to rules-accurate as possible. Why is this match pattern unreachable when using non-literal patterns? Column and row padding in tables How do you guys go about controlling column padding in tables?   Update  To clarify, I'm looking for a way to control both vertical and horizontal padding. So, if I had a simple table like in the following code snippet, I could pad the columns and make them look a bit less... ugly. :P   \begin{tabular}{|l|l|}     \hline     column 1 &amp; column 2 \\      \hline     I really would like this less &amp; crammed\\     \hline \end{tabular}   I tried this by using the command \vspace but it leaves gaps in the vertical lines.