Tuesday, 15 June 2010

Regex to check for a specific word, else string should have 1 character in length -



Regex to check for a specific word, else string should have 1 character in length -

iam trying come regex check if string not = word "space" word should of length 1 char. below tried still not successful. expecting help here.

((?=^/bspace/b).*{1})$

in requirement, iam trying perform regex_replace functionality should replace special characters in string starting 4 position. expecting help here well.

([a-za-z]{2}-.*(^[0-9a-za-z]){1,17})$

^(?:space|.)$

this should suffice first requriement.

for sec can seek

^(.{4})|([^!@#]*)|[!@#]

replace $1$2

see demo.

http://regex101.com/r/rq6mk9/19

regex

No comments:

Post a Comment