This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Regular Expression Tester - for fun  RSS feed

 
Saloon Keeper
Posts: 5485
55
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mentioned a few days ago that writing a quick and dirty regular expression tester would only take a few lines of code. While this is true, once I started adding features it started to grow. I'm posting it here because someone may find it useful.
Features:
  • Runs  from command line.
  • Allows entering regex and text to be searched.
  • Show matches as well as multiple occurrences with find.
  • Show matching groups.
  • Keep track of the most recent regex's and test texts.
  • Allow editing of current regex and text.

  • In the code, the RegexTester class is the meat & potatoes. Other classes are there to support the user interface.
    The EditDialog was a hack at a modal dialog that allowed for a longer TextField for editing. (I'm sure there must be an easier way.)





     
    Carey Brown
    Saloon Keeper
    Posts: 5485
    55
    Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Sample run for pattern: City, ST Zip
     
    it's a teeny, tiny, wafer thin ad:
    Programmatically Create PDF Using Free Spire.PDF with Java
    https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!