i want to search two word in string,so the second word is come away from 20 word or less from first word.
somthing like:
dog........(20 word with . , '' : number and other char).........Food
or
Food........(20 word with . , '' : number and other char).........Dog
how to skip 20 word and fanout this type of substring using regexp...
please understand this and give some Reg Exp solution
thank you,
Loading
vipul sathavaraPosted Sep 24, 2009, 12:31 AM
this is some part of my text document,please try to find some regexp
It was with that end in view that provisions were enacted in the impugned Act for speedier trial of the said offences by the appointment of Special Judges who were invested with exclusive jurisdiction to try the same and were also empowered to take cognizance thereof without the accused being committed to them for trial, and follow the procedure prescribed for the trial of warrant cases by magistrates. The proceedings before the Special Judges were thus assimilated to those before the Courts of sessions for trying cases without a jury or without the aid of assessors and the powers of appeal and revision invested in the High Court were also similarly circumscribed.
i have to enter two wods like appointment, committed .so it will skip the word btwn this two and hightlit this,also skip special char . , : ? / \ ( ) { } [ ] % $,and dates format
i also find something.
appointment (\ [a-zA-Z]*){0,20}\ committed
also concider Spaces ,pargraph if possible
thanks in advance.
Kirtan PatelPosted Sep 19, 2009, 12:33 PM
Tell me Exacat String you are using
i will try to Build RegEx
Serban CosminPosted Sep 19, 2009, 10:18 AM