Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

How to find word in string using regular expression regardless of case sensitivity ?

Exmaple:

  1. A1234_front123 in this need to find _front word
  2. a1235Front1234yy in this I need to find front

I need to design generic regular expression which can find any kind of words in given string

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
216 views
Welcome To Ask or Share your Answers For Others

1 Answer

If front could be another word, this should try with such combination:

(?<=[0-9])[A-Za-z_]+(?=[0-9_])

DEMO

it will work without case insensitive mode i


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...