sql - Full Text search using oracle regex -
I'm trying to use regexp_like () in Oracle 11G to get text search.
For example, I have columns where the posts are placed in the title column, if I have the value
'How to create a new post with pictures and videos 'How to enter a new post here' Enter the code here '' And if I write a question
select * from those posts where Regexp_like (title, '. * Image. *. *. *. *. *. * Post. *', 'I') This gives the record of both titles where the second value M Not a word picture I know because I users '|' In Expression
What I want to achieve, should be recorded only only when all words are present in any order in the column. Please help me with regex >
Hope this will help you.
I wrote a planner in Angular JS. It's just to demonstrate how regular expressions work.
You can use the regular expression
/ ^ (? =. (picture ()) (? =. <. < / Em> (post)) (? =? * (How)) [a-zA-Z] {1,100} $ /
This means the image, post, how to do it in the given paragraph You can adjust the length of the paragraph according to your requirement.
form role = "form" name = "myform"> & gt; Lt; div class = "col-sm-8" & gt; & lt; input type = "text" ng-model = "user" name = "input field" required = "true" ng-pattern = "/ ^ (? =. * (Picture)) (? =. * (Post)) (? =? * (How)) [a-zA-Z] {1,100} $ / "& gt; & lt; span ng-show =" myform Inputfield. $ Dirty & Myform.inputfield. $ Error. Option & amp; myform.inputfield. $ Error.pattern "& gt; small class =" text-danger "& gt; not matching & lt ; / Small>
Comments
Post a Comment