SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

REGEX / NOTES</>↗
Regex05 Nov 2010

How do I use reluctant quantifier regex?

The reluctant quantifiers start the matcher at the beginning of the input string, then reluctantly eat one character at a time looking for a match. The last thing they try is the entire input string. package org.kodejava.regex; import java.util.regex.Matcher; import java.util.regex.Pattern; public class ReluctantQuantifierDemo { public static void main(String[] args) { String[] expressions = {"x??", […]

Wayan · 2 min read
REGEX / NOTES</>↗
Regex05 Nov 2010

How do I use possessive quantifier regex?

The possessive quantifiers always eat the entire input string, trying once (and only once) for a match. Unlike the greedy quantifiers, possessive quantifiers never back off, even if doing so would allow the overall match to succeed. package org.kodejava.regex; import java.util.regex.Matcher; import java.util.regex.Pattern; public class PossessiveQuantifierDemo { public static void main(String[] args) { String[] regexs […]

Wayan · 2 min read
REGEX / NOTES</>↗
Regex05 Nov 2010

How do I write embedded flag expression?

It’s also possible to enable various flags using embedded flag expressions. Embedded flag expressions are an alternative to the two-argument version of compile, and are specified in the regular expression itself. The example below is use (?i) flag expression to enable case-insensitive matching. Another flag expressions are listed below: (?x), equivalent with Pattern.COMMENTS (?m), equivalent […]

Wayan · 2 min read
CORE API / NOTES</>↗
Core API05 Nov 2010

How do I pause the current thread?

You can pause a current thread for a number of milliseconds by using the sleep() method of the Thread class. While the current thread is sleeping, it will allow other threads to execute. package org.kodejava.lang; public class ThreadSleepDemo implements Runnable { public static void main(String[] args) { Thread thread = new Thread(new ThreadSleepDemo()); thread.start(); } […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API05 Nov 2010

How do I start a thread execution?

To make a thread begin its execution, call the start() method on a Thread or Runnable instance. Then the Java Virtual Machine will calls the run method of this thread. The snippet below is showing how to create a thread by implementing the Runnable interface. package org.kodejava.lang; public class ThreadRun implements Runnable { public static […]

Wayan · 1 min read
REGEX / NOTES</>↗
Regex03 Nov 2010

How do I use quantifier in regex?

A quantifier following a subsequence of a pattern determines the possibilities for how that subsequence of a pattern can repeat. Quantifiers allow you to specify the number of occurrences to match against. Quantifiers X? : X, once or not at all X* : X, zero or more times X+ : X, one or more times […]

Wayan · 3 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.