c# - Simple RegEx Expression -


ok admittedly terrible @ regex have need it, found myself in situation simple parse not cutting it. after attempting teach myself entirety of regex while sitting here @ work give , asked experts. parsing sql file , splitting on go statements. problem can't pull go out of other words, create table gopher. think i'm pretty safe saying split when have line that's spaces , word go case insensitive.

here's have, think it's pretty close, doing wrong it's not matching @ moment.

^+\s*[go]\s*\z 

*note case can taken care of ignore case flag, i'm not worried that

if write

^+[go]+\z 

it works, doesn't ignore spaces before , after go, thought \s* it, seems returning no matches. can fix me, short explanation of i'm flubbing here?

use regex.split pattern @"(?<=\bgo\b)", matches zero-width boundary after complete word "go".

see


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -