I want to be able to regex multiple sentences from one regex if it is possible
/(.*)<FooBar>/s
this only matches one word (I think) I need something that matches words follows by spaces.
this is the regex that I tried but does not seem to work I don't know if it's because of javascript syntax or something else. (I'm new to regex)
^.*(EVENTS\:OB\:\sRECORDS\snot|EVENTS\:OB\:\sRECORDS\sthat|EVENTS\:OB\:\sUnprocessed).(?<!0\.0)$
Uncaught SyntaxError: Unexpected token ^
these are examples of sentences that I want to regex
EVENTS:OB: Records not updated to status
EVENTS:OB: Records that were pending OR to be processed for yester day.
EVENTS:OB: Unprocessed records older than hour.
RENAS:OB:BOX: Unprocessed records older than hour.
RENAS:MOSS Pending
RENAS:TIGNET Pending
RENAS:OB:SI: Unprocessed records older than hour.
RENAS:OB:GC: Unprocessed records older than hour.
RENAS:RENAS:Count of pending message to process.
RENAS:OB:10+2_Status: Unprocessed records older than hour.
RENAS:RENAS_10+2:Unprocessed records in RENAS 10+2
RENAS:RENAS ACH:Count of pending message to process to FV.
RENAS:CheckNow:Count of pending message to process to FV
RENAS:OB:GB: Unprocessed records older than hour.
RENAS:RENAS: UN Processed records by MIXX for RENAS INSTRUCTONS
RENAS:RENAS: UN Processed records by MIXX for RENAS Break Bulk
RENAS:RENAS: UN Processed records by MIXX for RENAS
RENAS:OB:DOM:Unprocessed count of records older than hour.
RENAS:OB:DOM:Failed records in the database for previous date.
RENAS:OB:SI:Records that were pending to be processed for the previous day.
what I have been doing is this
function getLines(text) {
var lines = [];
var re = /^.*(EVENTS\:OB\:\sRECORDS\snot|EVENTS\:OB\:\sRECORDS\sthat|EVENTS\:OB\:\sUnprocessed).(?<!0\.0)$/;
while (m = re.exec(text)) {
lines.push(m[1]);
};
return lines;
}
$(function() {
$('#printlogs').html(getLines($('textarea').val()).join('<br>'));
});