Regular Expressions 101

Save & Share

Flavor

  • PCRE2 (PHP >=7.3)
  • PCRE (PHP <7.3)
  • ECMAScript (JavaScript)
  • Python
  • Golang
  • Java 8
  • .NET 7.0 (C#)
  • Rust
  • Regex Flavor Guide

Function

  • Match
  • Substitution
  • List
  • Unit Tests

Tools

Sponsors
There are currently no sponsors. Become a sponsor today!
An explanation of your regex will be automatically generated as you type.
Detailed match information will be displayed here automatically.
  • All Tokens
  • Common Tokens
  • General Tokens
  • Anchors
  • Meta Sequences
  • Quantifiers
  • Group Constructs
  • Character Classes
  • Flags/Modifiers
  • Substitution
  • A single character of: a, b or c
    [abc]
  • A character except: a, b or c
    [^abc]
  • A character in the range: a-z
    [a-z]
  • A character not in the range: a-z
    [^a-z]
  • A character in the range: a-z or A-Z
    [a-zA-Z]
  • Any single character
    .
  • Alternate - match either a or b
    a|b
  • Any whitespace character
    \s
  • Any non-whitespace character
    \S
  • Any digit
    \d
  • Any non-digit
    \D
  • Any word character
    \w
  • Any non-word character
    \W
  • Match everything enclosed
    (?:...)
  • Capture everything enclosed
    (...)
  • Zero or one of a
    a?
  • Zero or more of a
    a*
  • One or more of a
    a+
  • Exactly 3 of a
    a{3}
  • 3 or more of a
    a{3,}
  • Between 3 and 6 of a
    a{3,6}
  • Start of string
    ^
  • End of string
    $
  • A word boundary
    \b
  • Non-word boundary
    \B

Regular Expression

/
/
gm

Test String

Code Generator

Generated Code

import java.util.regex.Matcher; import java.util.regex.Pattern; public class Example { public static void main(String[] args) { final String regex = "^\\s+[ULCHIJAD]+E\\s+(.+)"; final String string = "---- Minecraft Crash Report ----\n" + "// I let you down. Sorry :(\n\n" + "Time: 28.10.15 11:27\n" + "Description: Exception in server tick loop\n\n" + "cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient\n" + " at cpw.mods.fml.common.LoadController.transition(LoadController.java:163)\n" + " at cpw.mods.fml.common.Loader.loadMods(Loader.java:544)\n" + " at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:87)\n" + " at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:314)\n" + " at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:117)\n" + " at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:387)\n" + " at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)\n" + "Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient\n" + " at java.lang.Class.forName0(Native Method)\n" + " at java.lang.Class.forName(Unknown Source)\n" + " at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:440)\n" + " at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)\n" + " at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)\n" + " at java.lang.reflect.Method.invoke(Unknown Source)\n" + " at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)\n" + " at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)\n" + " at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)\n" + " at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)\n" + " at com.google.common.eventbus.EventBus.post(EventBus.java:275)\n" + " at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)\n" + " at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)\n" + " at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n" + " at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)\n" + " at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)\n" + " at java.lang.reflect.Method.invoke(Unknown Source)\n" + " at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)\n" + " at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)\n" + " at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)\n" + " at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)\n" + " at com.google.common.eventbus.EventBus.post(EventBus.java:275)\n" + " at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)\n" + " at cpw.mods.fml.common.Loader.loadMods(Loader.java:513)\n" + " ... 5 more\n" + "Caused by: java.lang.ClassNotFoundException: net.minecraft.client.multiplayer.WorldClient\n" + " at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)\n" + " at java.lang.ClassLoader.loadClass(Unknown Source)\n" + " at java.lang.ClassLoader.loadClass(Unknown Source)\n" + " ... 29 more\n" + "Caused by: java.lang.RuntimeException: Attempted to load class bjf for invalid side SERVER\n" + " at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:50)\n" + " at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279)\n" + " at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176)\n" + " ... 31 more\n\n\n" + "A detailed walkthrough of the error, its code path and all known details is as follows:\n" + "---------------------------------------------------------------------------------------\n\n" + "-- System Details --\n" + "Details:\n" + " Minecraft Version: 1.7.10\n" + " Operating System: Windows 10 (amd64) version 10.0\n" + " Java Version: 1.8.0_60, Oracle Corporation\n" + " Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation\n" + " Memory: 882519880 bytes (841 MB) / 1056440320 bytes (1007 MB) up to 3728736256 bytes (3556 MB)\n" + " JVM Flags: 2 total; -Xmx4000M -Xmx4000M\n" + " AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used\n" + " IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0\n" + " FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1517 122 mods loaded, 122 mods active\n" + " States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored\n" + " UC mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) \n" + " UC FML{7.10.99.99} [Forge Mod Loader] (forge-1.7.10-10.13.4.1517-1.7.10-universal.jar) \n" + " UC Forge{10.13.4.1517} [Minecraft Forge] (forge-1.7.10-10.13.4.1517-1.7.10-universal.jar) \n" + " UC AM2-Preloader{0.0.2} [AMCore] (minecraft.jar) \n" + " UC CodeChickenCore{1.0.7.47} [CodeChicken Core] (minecraft.jar) \n" + " UC Micdoodlecore{} [Micdoodle8 Core] (minecraft.jar) \n" + " UC NotEnoughItems{1.0.5.118} [Not Enough Items] (NotEnoughItems-1.7.10-1.0.5.118-universal (1).jar) \n" + " UC <CoFH ASM>{000} [CoFH ASM] (minecraft.jar) \n" + " UC AnimationAPI{1.2.4} [AnimationAPI] (AnimationAPI-1.7.10-1.2.4 (1).jar) \n" + " UC arsmagica2{1.4.0.008} [Ars Magica 2] (1.7.10_AM2-1.4.0.008 (1).jar) \n" + " UC IC2{2.2.790-experimental} [IndustrialCraft 2] (industrialcraft-2-2.2.790-experimental.jar) \n" + " UC AdvancedSolarPanel{1.7.10-3.5.1} [Advanced Solar Panels] (Advanced-Solar-Panels-Addon-1.7.10.jar) \n" + " UC CoFHCore{1.7.10R3.0.3} [CoFH Core] (CoFHCore-[1.7.10]3.0.3-303 (1).jar) \n" + " UC advancedgenetics{1.5.9} [Advanced Genetics] (advancedgenetics-1.7.10-1.5.9.jar) \n" + " UC ArchimedesShips{1.7.10 v1.7.1} [Archimedes' Ships] (ArchimedesShips-1.7.1.jar) \n" + " UC Baubles{1.0.1.10} [Baubles] (Baubles-1.7.10-1.0.1.10.jar) \n" + " UC betterstorage{0.13.1.126} [BetterStorage] (BetterStorage-1.7.10-0.13.1.126.jar) \n" + " UC BiblioCraft{1.11.3} [BiblioCraft] (BiblioCraft[v1.11.3][MC1.7.10].jar) \n" + " UC BiomesOPlenty{2.1.0} [Biomes O' Plenty] (BiomesOPlenty-1.7.10-2.1.0.1462-universal.jar) \n" + " UC Botania{r1.7-228} [Botania] (Botania r1.7-228.jar) \n" + " UC Railcraft{9.7.0.0} [Railcraft] (Railcraft_1.7.10-9.7.0.0.jar) \n" + " UC TwilightForest{2.3.7} [The Twilight Forest] (twilightforest-1.7.10-2.3.7.jar) \n" + " UC ForgeMultipart{1.2.0.345} [Forge Multipart] (ForgeMultipart-1.7.10-1.2.0.345-universal.jar) \n" + " UC chisel{2.5.1.44} [Chisel 2] (Chisel2-2.5.1.44.jar) \n" + " UC CarpentersBlocks{3.3.8_dev_r2} [Carpenter's Blocks] (Carpenter's Blocks v3.3.8_dev_r2 - MC 1.7.10.jar) \n" + " UC ChickenChunks{1.3.4.19} [ChickenChunks] (ChickenChunks-1.7.10-1.3.4.19-universal (1).jar) \n" + " UC chocolateQuest{1.0} [Chocolate Quest] (chocolateQuest-1.7.10-1.0 (1).jar) \n" + " UC customnpcs{1.7.10c} [CustomNpcs] (CustomNPCs_1.7.10c.jar) \n" + " UC CustomOreGen{1.2.21} [Custom Ore Generation] (CustomOreGen-1.7.10-1.2.21.jar) \n" + " UC dldungeonsjdg{1.8.7} [Doomlike Dungeons] (DoomlikeDungeons-1.8.7-MC1.7.10.jar) \n" + " UC DragonMounts{r41-1.7.10} [Dragon Mounts] (DragonMounts-r41-1.7.10.jar) \n" + " UE DynamicLights{1.3.9} [Dynamic Lights] (DynamicLights-1.7.10.jar) \n" + " UE DynamicLights_onFire{1.0.5} [Dynamic Lights Burning Entity Module] (DynamicLights-1.7.10.jar) \n" + " UE DynamicLights_creepers{1.0.4} [Dynamic Lights Creeper Module] (DynamicLights-1.7.10.jar) \n" + " UE DynamicLights_dropItems{1.0.8} [Dynamic Lights EntityItem Module] (DynamicLights-1.7.10.jar) \n" + " UE DynamicLights_entityClasses{1.0.1} [Dynamic Lights Entity Light Module] (DynamicLights-1.7.10.jar) \n" + " UE DynamicLights_mobEquipment{1.0.8} [Dynamic Lights Mob Equipment Light Module] (DynamicLights-1.7.10.jar) \n" + " UE DynamicLights_flameArrows{1.0.0} [Dynamic Lights Fiery Arrows Light Module] (DynamicLights-1.7.10.jar) \n" + " UE DynamicLights_floodLights{1.0.2} [Dynamic Lights Flood Light] (DynamicLights-1.7.10.jar) \n" + " UE DynamicLights_otherPlayers{1.0.8} [Dynamic Lights OtherPlayers Light Module] (DynamicLights-1.7.10.jar) \n" + " UE DynamicLights_thePlayer{1.1.4} [Dynamic Lights Player Light Module] (DynamicLights-1.7.10.jar) \n" + " UC EnderStorage{1.4.7.37} [EnderStorage] (EnderStorage-1.7.10-1.4.7.37-universal (1).jar) \n" + " UC ThermalFoundation{1.7.10R1.2.0} [Thermal Foundation] (ThermalFoundation-[1.7.10]1.2.0-102 (1).jar) \n" + " UC ThermalExpansion{1.7.10R4.0.3B1} [Thermal Expansion] (ThermalExpansion-[1.7.10]4.0.3B1-218 (1).jar) \n" + " UC enhancedportals{3.0.12} [EnhancedPortals] (EnhancedPortals_1.7.10-universal-3.0.12.jar) \n" + " UC flansmod{4.10.0} [Flan's Mod] (Flans Mod-1.7.10-4.10.0.jar) \n" + " UC FoodPlus{3.2rS} [Food Plus] (FoodPlus-1.7.2-3.2rS.jar) \n" + " UC fossil{1.7.10 Build 7.2.1} [Fossils and Archeology Revival] (Fossils_Archeology_Revival-1.7.10_Build-7.2.1.jar) \n" + " UC GalacticraftCore{3.0.12} [Galacticraft Core] (GalacticraftCore-1.7-3.0.12.399.jar) \n" + " UC GalacticraftMars{3.0.12} [Galacticraft Planets] (Galacticraft-Planets-1.7-3.0.12.399.jar) \n" + " UC GraviSuite{1.7.10-2.0.3} [Graviation Suite] (Gravitation-Suite-Addon-1.7.10.jar) \n" + " UC iChunUtil{4.2.2} [iChunUtil] (iChunUtil-4.2.2 (1).jar) \n" + " UC GraviGun{4.0.0-beta} [GraviGun] (GravityGun-4.0.0-beta.jar) \n" + " UC grim3212core{V0.2 - 1.7.10} [Grim3212 Core] (Grim3212-Core-1.7.10 (2).jar) \n" + " UC IronChest{6.0.62.742} [Iron Chest] (ironchest-1.7.10-6.0.62.742-universal.jar) \n" + " UC JABBA{1.2.1} [JABBA] (Jabba-1.2.1a_1.7.10.jar) \n" + " UC Mantle{1.7.10-0.3.2.jenkins184} [Mantle] (Mantle-1.7.10-0.3.2 (1).jar) \n" + " UC Mekanism{8.1.7} [Mekanism] (Mekanism-1.7.10-8.1.7.252.jar) \n" + " UC MekanismGenerators{8.1.7} [MekanismGenerators] (MekanismGenerators-1.7.10-8.1.7.252.jar) \n" + " UC MekanismTools{8.1.7} [MekanismTools] (MekanismTools-1.7.10-8.1.7.252.jar) \n" + " UC MineFactoryReloaded{1.7.10R2.8.0} [MineFactory Reloaded] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC MineFactoryReloaded|CompatAppliedEnergistics{1.7.10R2.8.0} [MFR Compat: Applied Energistics] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC MineFactoryReloaded|CompatAtum{1.7.10R2.8.0} [MFR Compat: Atum] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC MineFactoryReloaded|CompatBackTools{1.7.10R2.8.0} [MFR Compat: BackTools] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC MineFactoryReloaded|CompatBuildCraft{1.7.10R2.8.0} [MFR Compat: BuildCraft] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC MineFactoryReloaded|CompatChococraft{1.7.10R2.8.0} [MFR Compat: Chococraft] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC MineFactoryReloaded|CompatExtraBiomes{1.7.10R2.8.0} [MFR Compat: ExtraBiomes] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC MineFactoryReloaded|CompatForestry{1.7.10R2.8.0} [MFR Compat: Forestry] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC MineFactoryReloaded|CompatForgeMicroblock{1.7.10R2.8.0} [MFR Compat: ForgeMicroblock] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC MineFactoryReloaded|CompatIC2{1.7.10R2.8.0} [MFR Compat: IC2] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC MineFactoryReloaded|CompatMystcraft{1.7.10R2.8.0} [MFR Compat: Mystcraft] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC MrTJPCoreMod{1.1.0.31} [MrTJPCore] (MrTJPCore-1.7.10-1.1.0.31-universal.jar) \n" + " UC ProjRed|Core{4.7.0pre9.92} [ProjectRed Core] (ProjectRed-1.7.10-4.7.0pre9.92-Base.jar) \n" + " UC ProjRed|Exploration{4.7.0pre9.92} [ProjectRed Exploration] (ProjectRed-1.7.10-4.7.0pre9.92-World.jar) \n" + " UC MineFactoryReloaded|CompatProjRed{1.7.10R2.8.0} [MFR Compat ProjectRed] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC MineFactoryReloaded|CompatRailcraft{1.7.10R2.8.0} [MFR Compat: Railcraft] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC MineFactoryReloaded|CompatSufficientBiomes{1.7.10R2.8.0} [MFR Compat: Sufficient Biomes] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC MineFactoryReloaded|CompatThaumcraft{1.7.10R2.8.0} [MFR Compat: Thaumcraft] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC MineFactoryReloaded|CompatThermalExpansion{1.7.10R2.8.0} [MFR Compat: Thermal Expansion] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC TConstruct{1.7.10-1.8.5.build957} [Tinkers' Construct] (TConstruct-1.7.10-1.8.5.jar) \n" + " UC MineFactoryReloaded|CompatTConstruct{1.7.10R2.8.0} [MFR Compat: Tinkers' Construct] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC MineFactoryReloaded|CompatTwilightForest{1.7.10R2.8.0} [MFR Compat: TwilightForest] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC MineFactoryReloaded|CompatVanilla{1.7.10R2.8.0} [MFR Compat: Vanilla] (MineFactoryReloaded-[1.7.10]2.8.0-104 (1).jar) \n" + " UC AS_Minions{1.9.4} [Minions] (Minions-1.7.10.jar) \n" + " UC testdummy{1.0} [MmmMmmMmmMmm] (MmmMmmMmmMmm-1.6.jar) \n" + " UC MorePlanet{1.3.0} [More Planets] (More-Planets-1.7.10-1.3.0-Pre-1 (1).jar) \n" + " UC Morph{0.9.2} [Morph] (Morph-Beta-0.9.2.jar) \n" + " UC NetherOres{1.7.10R2.3.0} [Nether Ores] (NetherOres-[1.7.10]2.3.0-12 (1).jar) \n" + " UC clearingblock{0.3} [ClearingBlock Mod] (Nuclear Bomb Mod 1.0v.jar) \n" + " UC nuclearcraft{V0.1 - 1.7.10} [Nuclear Craft] (Nuclear-Craft-Mod-1.7.10.jar) \n" + " UC OreSpawn{1.7.10.20.3} [OreSpawn] (orespawn-1.7.10-20.3 (1).zip) \n" + " UC PortalGun{4.0.0-beta-5} [PortalGun] (Portal-Gun-Mod-1.7.10.jar) \n" + " UC PowerConverters{1.7.10_3.3.0-jenkins.76} [Power Converters] (PowerConverters-1.7.10_3.3.0-jenkins.76.jar) \n" + " UC ProjRed|Transmission{4.7.0pre9.92} [ProjectRed Transmission] (ProjectRed-1.7.10-4.7.0pre9.92-Integration.jar) \n" + " UC ProjRed|Transportation{4.7.0pre9.92} [ProjectRed Transportation] (ProjectRed-1.7.10-4.7.0pre9.92-Mechanical.jar) \n" + " UC ProjRed|Compatibility{4.7.0pre9.92} [ProjectRed Compatibility] (ProjectRed-1.7.10-4.7.0pre9.92-Compat.jar) \n" + " UC ProjRed|Integration{4.7.0pre9.92} [ProjectRed Integration] (ProjectRed-1.7.10-4.7.0pre9.92-Integration.jar) \n" + " UC ProjRed|Fabrication{4.7.0pre9.92} [ProjectRed Fabrication] (ProjectRed-1.7.10-4.7.0pre9.92-Fabrication.jar) \n" + " UC ProjRed|Illumination{4.7.0pre9.92} [ProjectRed Illumination] (ProjectRed-1.7.10-4.7.0pre9.92-Lighting.jar) \n" + " UC ProjRed|Expansion{4.7.0pre9.92} [ProjectRed Expansion] (ProjectRed-1.7.10-4.7.0pre9.92-Mechanical.jar) \n" + " UC qCraft{1.2} [qCraft] (qCraft1.2.zip) \n" + " UC QuarryPlus{2.1.0} [QuarryPlus] (QuarryPlus-1.7.10-2.1.0.jar) \n" + " UC RandomThings{2.2.4} [Random Things] (RandomThings-2.2.4.jar) \n" + " UC RedstoneArsenal{1.7.10R1.1.1} [Redstone Arsenal] (RedstoneArsenal-[1.7.10]1.1.1-89 (1).jar) \n" + " UC rivalrebels{1.7.10N} [Rival Rebels] (rivalrebels-1.7.10N.jar) \n" + " UC secretroomsmod{4.7.1} [The SecretRoomsMod] (secretroomsmod-1.7.10-4.7.1.413.jar) \n" + " UC simplyjetpacks{1.5.1} [Simply Jetpacks] (SimplyJetpacks-MC1.7.10-1.5.1.jar) \n" + " UC Sync{4.0.0} [Sync] (Sync-4.0.0.jar) \n" + " UC ThermalDynamics{1.7.10R1.1.0} [Thermal Dynamics] (ThermalDynamics-[1.7.10]1.1.0-161 (1).jar) \n" + " UC TMechworks{1.7.10-75.0afb56c} [Tinkers' Mechworks] (TMechworks-1.7.10-0.2.9.jar) \n" + " UC Torched{4.0.0} [Torched] (Torched-4.0.0.jar) \n" + " UC Translocator{1.1.2.15} [Translocator] (Translocator-1.7.10-1.1.2.15-universal (1).jar) \n" + " UC AS_UpdateCheck{1.1.6} [AtomicStryker Update Check Mod] (UpdateCheckerMod-1.7.10.jar) \n" + " UC witchery{0.24.1} [Witchery] (witchery-1.7.10-0.24.1.jar) \n" + " UC WR-CBE|Core{1.4.1.9} [WR-CBE Core] (WR-CBE-1.7.10-1.4.1.9-universal (1).jar) \n" + " UC WR-CBE|Addons{1.4.1.9} [WR-CBE Addons] (WR-CBE-1.7.10-1.4.1.9-universal (1).jar) \n" + " UC WR-CBE|Logic{1.4.1.9} [WR-CBE Logic] (WR-CBE-1.7.10-1.4.1.9-universal (1).jar) \n" + " UC McMultipart{1.2.0.345} [Minecraft Multipart Plugin] (ForgeMultipart-1.7.10-1.2.0.345-universal.jar) \n" + " UC ForgeRelocation{0.0.1.4} [ForgeRelocation] (ForgeRelocation-1.7.10-0.0.1.4-universal.jar) \n" + " UC MCFrames{1.0} [MCFrames] (ForgeRelocation-1.7.10-0.0.1.4-universal.jar) \n" + " UC RelocationFMP{0.0.1.2} [RelocationFMP] (ForgeRelocationFMP-1.7.10-0.0.1.2-universal.jar) \n" + " UC ForgeMicroblock{1.2.0.345} [Forge Microblocks] (ForgeMultipart-1.7.10-1.2.0.345-universal.jar) \n" + " CoFHCore: -[1.7.10]3.0.3-303\n" + " ThermalFoundation: -[1.7.10]1.2.0-102\n" + " ThermalExpansion: -[1.7.10]4.0.3B1-218\n" + " Mantle Environment: Environment healthy.\n" + " MineFactoryReloaded: -[1.7.10]2.8.0-104\n" + " TConstruct Environment: Environment healthy.\n" + " NetherOres: -[1.7.10]2.3.0-12\n" + " RedstoneArsenal: -[1.7.10]1.1.1-89\n" + " ThermalDynamics: -[1.7.10]1.1.0-161\n" + " Profiler Position: N/A (disabled)\n" + " Is Modded: Definitely; Server brand changed to 'fml,forge'\n" + " Type: Dedicated Server (map_server.txt)\n"; final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE); final Matcher matcher = pattern.matcher(string); while (matcher.find()) { System.out.println("Full match: " + matcher.group(0)); for (int i = 1; i <= matcher.groupCount(); i++) { System.out.println("Group " + i + ": " + matcher.group(i)); } } } }

Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Java, please visit: https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html