/** * Searches <code>searchIn</code> for an occurrence of <code>regEx</code> * either forwards or backwards, matching case or not. * * @param regEx The regular expression to look for. * @param searchIn The string to search in. * @param goForward Whether to search forward. If <code>false</code>, * search backward. * @param matchCase Whether or not to do a case-sensitive search for * <code>regEx</code>. * @param wholeWord If <code>true</code>, <code>regEx</code> * occurrences embedded in longer words in <code>searchIn</code> * don't count as matches. * @return A <code>Point</code> representing the starting and ending * position of the match, or <code>null</code> if no match was * found. * @throws PatternSyntaxException If <code>regEx</code> is an invalid * regular expression. * @see #getNextMatchPos */ private static Point getNextMatchPosRegEx(String regEx, CharSequence searchIn, boolean goForward, boolean matchCase, boolean wholeWord) { return (Point)getNextMatchPosRegExImpl(regEx, searchIn, goForward, matchCase, wholeWord, null); }
boolean matchCase = context.getMatchCase(); boolean wholeWord = context.getWholeWord(); return (RegExReplaceInfo)getNextMatchPosRegExImpl(regex, searchIn, goForward, matchCase, wholeWord, replacement);
/** * Searches <code>searchIn</code> for an occurrence of <code>regEx</code> * either forwards or backwards, matching case or not. * * @param regEx The regular expression to look for. * @param searchIn The string to search in. * @param goForward Whether to search forward. If <code>false</code>, * search backward. * @param matchCase Whether or not to do a case-sensitive search for * <code>regEx</code>. * @param wholeWord If <code>true</code>, <code>regEx</code> * occurrences embedded in longer words in <code>searchIn</code> * don't count as matches. * @return A <code>Point</code> representing the starting and ending * position of the match, or <code>null</code> if no match was * found. * @throws PatternSyntaxException If <code>regEx</code> is an invalid * regular expression. * @see #getNextMatchPos */ private static Point getNextMatchPosRegEx(String regEx, CharSequence searchIn, boolean goForward, boolean matchCase, boolean wholeWord) { return (Point)getNextMatchPosRegExImpl(regEx, searchIn, goForward, matchCase, wholeWord, null); }
/** * Searches <code>searchIn</code> for an occurrence of <code>regEx</code> * either forwards or backwards, matching case or not. * * @param regEx The regular expression to look for. * @param searchIn The string to search in. * @param goForward Whether to search forward. If <code>false</code>, * search backward. * @param matchCase Whether or not to do a case-sensitive search for * <code>regEx</code>. * @param wholeWord If <code>true</code>, <code>regEx</code> * occurrences embedded in longer words in <code>searchIn</code> * don't count as matches. * @return A <code>Point</code> representing the starting and ending * position of the match, or <code>null</code> if no match was * found. * @throws PatternSyntaxException If <code>regEx</code> is an invalid * regular expression. * @see #getNextMatchPos */ public static Point getNextMatchPosRegEx(String regEx, CharSequence searchIn, boolean goForward, boolean matchCase, boolean wholeWord) { return (Point)getNextMatchPosRegExImpl(regEx, searchIn, goForward, matchCase, wholeWord, null); }
/** * Searches <code>searchIn</code> for an occurrence of <code>regEx</code> * either forwards or backwards, matching case or not. * * @param regEx The regular expression to look for. * @param searchIn The string to search in. * @param goForward Whether to search forward. If <code>false</code>, * search backward. * @param matchCase Whether or not to do a case-sensitive search for * <code>regEx</code>. * @param wholeWord If <code>true</code>, <code>regEx</code> * occurrences embedded in longer words in <code>searchIn</code> * don't count as matches. * @return A <code>Point</code> representing the starting and ending * position of the match, or <code>null</code> if no match was * found. * @throws PatternSyntaxException If <code>regEx</code> is an invalid * regular expression. * @see #getNextMatchPos */ public static Point getNextMatchPosRegEx(String regEx, CharSequence searchIn, boolean goForward, boolean matchCase, boolean wholeWord) { return (Point)getNextMatchPosRegExImpl(regEx, searchIn, goForward, matchCase, wholeWord, null); }
replacement = ""; return (RegExReplaceInfo)getNextMatchPosRegExImpl(regEx, searchIn, goForward, matchCase, wholeWord, replacement);
replacement = ""; return (RegExReplaceInfo)getNextMatchPosRegExImpl(regEx, searchIn, goForward, matchCase, wholeWord, replacement);
boolean matchCase = context.getMatchCase(); boolean wholeWord = context.getWholeWord(); return (RegExReplaceInfo)getNextMatchPosRegExImpl(regex, searchIn, goForward, matchCase, wholeWord, replacement);