• 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
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

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: 4988
54
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!