Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Simple Regex Not Working  RSS feed

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to run a simple regex match which is not working. Would appreciate any suggestion explaining why i cannot get a match below.



i was hoping that when i will run this simple test ,it will print MATCH. But it didn't. any how i can make it work ?

I tried below variations, but none worked -



OR



OR

 
Saloon Keeper
Posts: 4735
52
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You were missing the period.

"g*" says "zero or more g's"
"g.*" says a 'g' followed by zero or more of any character.
 
john bah
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Carey Brown wrote:You were missing the period.

"g*" says "zero or more g's"
"g.*" says a 'g' followed by zero or more of any character.



thanks it worked.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!