A
A
Alexey S.2017-03-09 03:12:15
Perl
Alexey S., 2017-03-09 03:12:15

How to correctly compose a regular expression if the value may not be in the template?

Example:

<BR>
<IMG skip>Юзер1<HR>
<BR>
Юзер2<HR>

How to select all users? (the problem is that the picture is either , or not.
If you forget about the picture, then the regular expression would be like this:
/\s*<BR>
\s*(.+?)<HR>/mig

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Dart, 2017-03-09
@Winsik

How about https://regex101.com/r/rFfpHl/1 ?
(R>|skip>)(.*?)<

T
tyzberd, 2017-12-08
@NiceIce

you just don't have initialization for these pictures. Add

$('.image').magnificPopup({
  delegate: '.example-image-link', // child items selector, by clicking on it popup will open
  type: 'image',
  gallery: {
    enabled: true
  }
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question